if not exists(select 1 from syscolumns where id = object_id('EST_NF_ENT_IT') and name = 'FLAG_ICMS_RETIDO_CALCULADO')
begin
ALTER TABLE dbo.EST_NF_ENT_IT ADD
	FLAG_ICMS_RETIDO_CALCULADO int NULL

ALTER TABLE dbo.EST_NF_ENT_IT ADD CONSTRAINT
	DF_EST_NF_ENT_IT_FLAG_ICMS_RETIDO_CALCULADO DEFAULT 0 FOR FLAG_ICMS_RETIDO_CALCULADO
end