SQL SERVER 2000:
select object_name(id),name from syscolumns where columnproperty(id,name,'IsIdentity')=1
SQLSERVER 2005:
select object_name(object_id),name from sys.identity_columns
SQL Server 2005 stores the last value of the identity property that was generated. To query the last value execute the following query.
select name,last_value from sys.identity_columns
|
No responses found. Be the first to respond and make money from revenue sharing program.
|