/*ADD one column "ColumnName" in table TableName */
IF NOT EXISTS ( SELECT 'X' FROM INFORMATION_SCHEMA.COLUMNS COLUMNS, INFORMATION_SCHEMA.TABLES TABLES
WHERE
COLUMNS.TABLE_NAME=TABLES.TABLE_NAME AND UPPER(COLUMNS.COLUMN_NAME)=UPPER('ColumnName') AND UPPER(TABLES.TABLE_NAME) = UPPER('TableName'))
BEGIN
ALTER TABLE TableName ADD ColumnName INT Default(0)
END
GO
IF NOT EXISTS ( SELECT 'X' FROM INFORMATION_SCHEMA.COLUMNS COLUMNS, INFORMATION_SCHEMA.TABLES TABLES
WHERE
COLUMNS.TABLE_NAME=TABLES.TABLE_NAME AND UPPER(COLUMNS.COLUMN_NAME)=UPPER('ColumnName') AND UPPER(TABLES.TABLE_NAME) = UPPER('TableName'))
BEGIN
ALTER TABLE TableName ADD ColumnName INT Default(0)
END
GO