

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'OLAYKATEGORISIID' AND SYSOBJECTS.name = 'OLAYBEKLENMEYEN')
BEGIN
 ALTER TABLE OLAYBEKLENMEYEN ADD OLAYKATEGORISIID int NULL
END
GO
