Determining an IDENTITY COLUMN on a Table

  • I was wondering if this is possible. Given a table name and a column name, how will you be able to determine if the column is an identity column by using T-SQL? Is this possible? If it is does any one have sample code?

    Thanks in advance

  • SELECT COLUMNPROPERTY( OBJECT_ID('TblName'),'Column_Name','IsIdentity')

    HTH


    * Noel

  • You are a life saver. Thank you very much.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply