我正在搜索一个查询,它告诉我表的主键的名称
示例:在oracle中我这样做
select CONSTRAINT_NAME from user_constraints where table_name = 'CT' AND CONSTRAINT_TYPE ='P'
如何在 sybase 中做到这一点?
最佳答案
试试这个方法:
select name
from sysindexes
where indid > 0
and status2 & 2 = 2
关于sybase - 如何从查询中获取主键的名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17143685/