IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'OKCREFNO' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE dbo.FATURA ADD
	OKCREFNO nvarchar(50) NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'OKCDURUM' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE dbo.FATURA ADD
	OKCDURUM bit NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'KALAN' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE dbo.FATURA ADD
	KALAN float(53) NULL
GO	
