Determine identity column (判斷識別規格欄位)

IF ((SELECT OBJECTPROPERTY( OBJECT_ID(N'table_name_here'), 'TableHasIdentity')) = 1)
    PRINT 'Yes'
ELSE
    PRINT 'No'

sql server - How do you determine what SQL Tables have an identity column programatically - Stack Overflow