IF OBJECTPROPERTY( OBJECT_ID( '[dbo].[Employee]' ), 'TableHasPrimaryKey' ) = 1 PRINT '[dbo].[Employee] table has a primary key.'ELSE PRINT '[dbo].[Employee] table has no primary key.'
Login to post response