IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'FLAG_BLOQUEIO_DESC' 
				AND OBJECT_ID = OBJECT_ID('EST_PROD_TBL_DESC'))
begin
ALTER TABLE dbo.EST_PROD_TBL_DESC ADD
	FLAG_BLOQUEIO_DESC int NOT NULL CONSTRAINT DF_EST_PROD_TBL_DESC_FLAG_BLOQUEIO_DESC DEFAULT 0
end
go
UPDATE
	EST_PROD_TBL_DESC
SET
	FLAG_BLOQUEIO_DESC=1
WHERE
	CD_EMP =1
	AND CD_TBL_DESC=1
	AND FLAG_BLOQUEIO_DESC=0
	AND DS_TBL_DESC='TABELA DE DESCONTO LIMITE'
