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
During development and everyday use, Substring is often the go-to choice for string manipulation. However, there are cases where Substring c...
0 Comments