IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'AMLONERILDI' AND SYSOBJECTS.name = 'HMUAYENE')

ALTER TABLE HMUAYENE ADD AMLONERILDI BIT NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'AMLONERILDI' AND SYSOBJECTS.name = 'HMUAYENE')

ALTER TABLE dbo.HMUAYENE ADD CONSTRAINT
	DF_HMUAYENE_AMLONERILDI DEFAULT 0 FOR AMLONERILDI
GO
