Thursday, 4 February 2021

MSSQL - Check if column exists - add column if it doesn't exist

 

 Watch this example on YouTube


 

If COL_LENGTH('dbo.Product', 'Name') is null
begin
    Alter table Product add Name varchar(50) null
end 

No comments:

Post a Comment