IF EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'MDLHADRES' AND SYSOBJECTS.name = 'HDOSYA')
ALTER TABLE dbo.HDOSYA ALTER COLUMN
	MDLHADRES nvarchar(200) NULL
GO

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