I am searching for a query that tell me the NAME of the primary-key of a table
example: In oracle I do this
select CONSTRAINT_NAME from user_constraints where table_name = 'CT' AND CONSTRAINT_TYPE ='P'
how to do that in sybase ?
Try this way:
select name
from sysindexes
where indid > 0
and status2 & 2 = 2