IF COL_LENGTH('dbo.stbTable01', 'siCol01') IS NULL
BEGIN
	ALTER TABLE dbo.stbTable01
	ADD siCol01 smallint NOT NULL DEFAULT 0
	PRINT 'column siCol01 added'
END
ELSE
BEGIN
	PRINT 'column siCol01 already exist'
END
Last modified: May 21, 2021

Author

Comments

Write a Reply or Comment