
---- Tabella TipiProdotto campo IDaliquotadefault  ---

IF NOT EXISTS(SELECT 1
FROM sysobjects,
syscolumns
WHERE sysobjects.id = syscolumns.id
AND sysobjects.name = 'IVA'
AND syscolumns.name = 'FAEL_Natura')
BEGIN 
ALTER TABLE dbo.IVA ADD
	[FAEL_Natura] [varchar](2) NOT NULL CONSTRAINT [DF_IVA_FAEL_Natura]  DEFAULT ('')

END



---- Tabella TipiProdotto campo Nascosto  ---

IF NOT EXISTS(SELECT 1
FROM sysobjects,
syscolumns
WHERE sysobjects.id = syscolumns.id
AND sysobjects.name = 'IVA'
AND syscolumns.name = 'Nascosto')
BEGIN 
ALTER TABLE dbo.IVA ADD
	[Nascosto] bit NOT NULL CONSTRAINT DF_IVA_Nascosto DEFAULT 0

END