Can TVF have a PK or there is a bug in my query?

  • While debugging something, I came across a problem that  Table-valued-function allegedly has primary key on it. The query below produces 2 records.

    select  k.name,
    o.name,
    o.type_desc,
    k.type_desc
    from sys.objects o join sys.key_constraints k
    on o.object_id = k.parent_object_id
    where k.type = 'PK'
    and o.type_desc = 'SQL_