IF NOT EXISTS (
    SELECT 1 
    FROM sys.columns 
    WHERE name = 'NUM_RPS_ORIGEM_VENDA' 
      AND object_id = OBJECT_ID('EST_RPS')
)
BEGIN
    ALTER TABLE EST_RPS
	ADD NUM_RPS_ORIGEM_VENDA INT NULL;
END
GO
