SyntaxFix
Write A Post
Hire A Developer
Questions
Another way (for 2000 / 2005/2012/2014):
IF ((SELECT OBJECTPROPERTY( OBJECT_ID(N'table_name_here'), 'TableHasIdentity')) = 1) PRINT 'Yes' ELSE PRINT 'No'
NOTE: table_name_here should be schema.table, unless the schema is dbo.
table_name_here
schema.table
dbo