Wednesday, August 29, 2018

check in T-SQL to see if a Type exists

Use this...

IF TYPE_ID(N'dbo.Aardvark') IS NULL

 
 

...instead of this:

IF OBJECT_ID(N'dbo.Aardvark') IS NULL

No comments:

Post a Comment