IF not EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AmaliateSystem' AND COLUMN_NAME = 'AS_ID') begin alter table AmaliateSystem add AS_ID int references AmaliateSystem(ID) null end