Pages

Tuesday, August 13, 2013

SQL SERVER – 2005 – List All Column With Indentity Key In Specific Database | Journey to SQL Authority with Pinal Dave

Question I received in Email : How to list all the columns in the database which are used as identity key in my database? Answer: Run following query in query editor. USE AdventureWorks GO SELECT SCHEMA_NAME(schema_id) AS schema_name, t.name AS table_name, c.name AS column_name FROM sys.tables AS t JOIN sys.identity_columns c ON t.OBJECT_ID = c.OBJECT_ID… Continue Reading...

Source: SQL SERVER – 2005 – List All Column With Indentity Key In Specific Database | Journey to SQL Authority with Pinal Dave

No comments:

Post a Comment