IF (Not EXISTS(select * from sys.syscolumn as C, sys.systable as T where LCase(T.table_name) = LCase('Hotels') and LCase(C.column_name) = LCase('ExternalHotelId') and C.table_id=T.table_id)) THEN alter table Hotels add ExternalHotelId integer END IF GO