-----------------------------------------------------------------------------------------'
-- Aggiunta campo GT06_INELAB
-----------------------------------------------------------------------------------------'

IF NOT EXISTS(
    SELECT
        TOP 1 1
    FROM
        SYSCOLUMNS
    INNER JOIN SYSOBJECTS
	ON SYSOBJECTS.ID = SYSCOLUMNS.ID
    WHERE
        SYSCOLUMNS.NAME = 'GT06_INELAB'
	AND SYSOBJECTS.NAME = 'GT06_ARTICOLI'
)
	BEGIN
		ALTER TABLE GT06_ARTICOLI
		ADD GT06_INELAB tinyint NOT NULL DEFAULT ((0))
		
		PRINT 'Tabella GT06_ARTICOLI: campo GT06_INELAB creato'

	END
ELSE
	BEGIN
	PRINT 'Tabella GT06_ARTICOLI: campo GT06_INELAB esistente, creazione non effettuata'
	END
GO