IF NOT EXISTS(SELECT 1
FROM sysobjects,
syscolumns
WHERE sysobjects.id = syscolumns.id
AND sysobjects.name = 'TipiProdotto'
AND syscolumns.name = 'IdPadre')
BEGIN 
ALTER TABLE dbo.TipiProdotto ADD
	IdPadre INT NOT NULL CONSTRAINT DF_TipiProdotto_IdPadre_1 DEFAULT ((0))
END

