In this tutorial i will check 'TestCulumns' column exists in a table, when its not exist, add this column.
IF EXISTS( SELECT * FROM sys.columns WHERE Name = N'TestCulumns' AND Object_ID = Object_ID(N'Categories')) BEGIN SELECT * FROM Categories; END ELSE BEGIN ALTER TABLE Categories ADD TestCulumns VARCHAR(20); END
Comments
Post a Comment