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
Artificial Intelligence (AI) is one of the most exciting technologies in our world today. But the terms that come with it like GenAI, LLMs, ...
0 Comments