>>How do I determine if a table in a database has an identity column. If it does -- how do I determine what the seed and increment is?
>>
>>Thanks
>>
>>Gar
>
>I should have added that I not only need to know whether there is an identity column, but which column it is.
>
>Thanks
>
>Gar
I 99% answered my own question
select top 1;
ident_seed('mytable'),;
ident_incr('mytable'),;
identitycol ;
FROM mytable
Row 1, col 1 of my result set is indenty seed.
Row 1, col 2 of my result set is indentity increment.
Row 1, col 3 of my result set does not contain the answer: The identity name is the NAME of column 3, not the contents.
The damn thing is doing exactly what I told it to, instead of reading my mind and doing what I want it to <g>.
So what is the syntax to get that identity column name into the result set, rather than just the name of a column?
Thanks
Thanks
Gar W. Lipow