

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'ERTELENENRANDDURUMID' AND SYSOBJECTS.name = 'HRANDEVU')
ALTER TABLE HRANDEVU ADD ERTELENENRANDDURUMID INT NULL

GO
