Primary Key is not always 1 column, so you may need to print multiple names.
here is a sql query:
select s.name as TABLE_SCHEMA, t.name as TABLE_NAME,
k.name as CONSTRAINT_NAME, c.name as COLUMN_NAME,
ic.key_ordinal AS ORDINAL_POSITION
from sys.key_constraints as k
join sys.tables as t
on t.object_id = k.parent_object_id
join sys.schemas as s
on s.schema_id = t.schema_id
join sys.index_columns as ic
on ic.object_id = t.object_id
and ic.index_id = k.unique_index_id
join sys.columns as c
on c.object_id = t.object_id
and c.column_id = ic.column_id
where k.type = 'PK' and t.name='YOURTABLEHERE'
the rules of SQL state that an object in the database be definined by the same language as the database objects....
in other words a sql database structure is queryable...