I want a list of all identity columns. Do you know in which system table the information can be found?
BTW: I use Sybase IQ 16
I want a list of all identity columns. Do you know in which system table the information can be found?
BTW: I use Sybase IQ 16
Figured it out like this:
CREATE TABLE TEST
(
C1 INT IDENTITY NOT NULL
,C2 INT
)
SELECT * FROM SYS.SYSCOLUMNS WHERE TNAME = 'TEST'
so the answer is:
SELECT
tname, cname
FROM SYS.SYSCOLUMNS WHERE default_value = 'autoincrement'