IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'PTANIM' AND SYSOBJECTS.name = 'OLAY')
ALTER TABLE dbo.OLAY ADD 	PTANIM nvarchar(500) NULL

GO


IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'AETKEN' AND SYSOBJECTS.name = 'OLAY')
ALTER TABLE dbo.OLAY ADD 	AETKEN nvarchar(500) NULL

GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'YETKEN' AND SYSOBJECTS.name = 'OLAY')
ALTER TABLE dbo.OLAY ADD 	YETKEN nvarchar(500) NULL

GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'LITBILGISI' AND SYSOBJECTS.name = 'OLAY')
ALTER TABLE dbo.OLAY ADD 	LITBILGISI nvarchar(500) NULL

GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'YFAALIYET' AND SYSOBJECTS.name = 'OLAY')
ALTER TABLE dbo.OLAY ADD 	YFAALIYET nvarchar(500) NULL

GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'KSONUC' AND SYSOBJECTS.name = 'OLAY')
ALTER TABLE dbo.OLAY ADD 	KSONUC nvarchar(500) NULL

GO

