
IF NOT EXISTS(SELECT 1
FROM sysobjects,
syscolumns
WHERE sysobjects.id = syscolumns.id
AND sysobjects.name = 'Soggetti'
AND syscolumns.name = 'CODICE_LOTTERIA')

ALTER TABLE Soggetti
	ADD CODICE_LOTTERIA varchar(8) NULL
GO