Tuesday, 30 June 2020

SQL Server - MSSQL - Create table if it doesn't exist

Watch this example on YouTube




if OBJECT_ID(N'Test3', N'U') Is Null
Begin
  CREATE TABLE Test3(
    ID [int] Identity(1,1) Not Null,
    SomeName [varchar](10) null
  )
End

No comments:

Post a Comment