How to check a primary key exists or not in table
IF OBJECTPROPERTY( OBJECT_ID( '[dbo].[Customers]' ), 'TableHasPrimaryKey' ) = 1
PRINT '[dbo].[Customers] table has a primary key.
PRINT '[dbo].[Customers] table has a primary key.
MSDEVBUILD - Community of Microsoft AI, Azure and Xamarin by Suthahar - Solution Architect for Microsoft AI, Azure, Xamarin | Tech Author and Speaker
Whether you're a student, beginner, or professional looking to upskill with Microsoft Azure, here are 3 ways to get started with zero ...
0 Comments