How to list identity columns available in a database, along with table names.
There are many ways to list identity columns .. but the simplest one I ever came up with is
--# Respective table name is also included.
select object_name(id) tableName, name columnName from syscolumns where status = 128
Related Posts :
1. Another way to get List of tables having 'identity' column
Wednesday, June 18
How to get list of 'identity' columns in a database
Labels:
SQL Tricks
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment