gpt4 book ai didi

sybase - 如何从查询中获取主键的名称

转载 作者:行者123 更新时间:2023-12-05 00:29:29 46 4
gpt4 key购买 nike

我正在搜索一个查询,它告诉我表的主键的名称
示例:在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/

46 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com