Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要一个所有身份列的列表。你知道在哪个系统表中可以找到信息吗?
顺便说一句:我使用 Sybase IQ 16
想出来是这样的:
CREATE TABLE TEST ( C1 INT IDENTITY NOT NULL ,C2 INT ) SELECT * FROM SYS.SYSCOLUMNS WHERE TNAME = 'TEST'
所以答案是:
SELECT tname, cname FROM SYS.SYSCOLUMNS WHERE default_value = 'autoincrement'