To Get the Identity column name for Tbl_Customer we need to execute the following query.
SELECT D.name AS ColumnName, O.name AS TableName
FROM sys.identity_columns D INNER JOIN Sys.Objects O ON O.object_id=D.object_id
Where O.name='Tbl_Customer
SQL Server 2000/2005
SELECT D.name AS ColumnName, O.name AS TableName
FROM sys.identity_columns D INNER JOIN Sys.Objects O ON O.object_id=D.object_id
Where O.name='Tbl_Customer
Copyright © 2009 SQL Server Solutions. All Rights Reserved.
No comments:
Post a Comment