IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'SERINO' AND SYSOBJECTS.name = 'FATISL')
ALTER TABLE FATISL ADD SERINO VARCHAR(30)

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'LOTNO' AND SYSOBJECTS.name = 'FATISL')
ALTER TABLE FATISL ADD LOTNO VARCHAR(30)

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'UBBKODU' AND SYSOBJECTS.name = 'FATISL')
ALTER TABLE FATISL ADD UBBKODU VARCHAR(50)

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'TUKETIMYAPILABILIR' AND SYSOBJECTS.name = 'STOK')
ALTER TABLE dbo.STOK ADD
	TUKETIMYAPILABILIR bit NOT NULL CONSTRAINT [DF_STOK_TUKETIMYAPILABILIR] DEFAULT (1)
go