IF NOT EXISTS(SELECT * FROM sys.columns
WHERE [name] = N'columnName' AND [object_id] = OBJECT_ID(N'tableName'))
BEGIN
ALTER tableName ADD [columnName] [ntext] NULL
END
WHERE [name] = N'columnName' AND [object_id] = OBJECT_ID(N'tableName'))
BEGIN
ALTER tableName ADD [columnName] [ntext] NULL
END
No comments:
Post a Comment