oracle trigger:table1xvalue--------yvalue123456 897654create trigger trigger_sample_ORACLEbefore inserton table1reference new as newfor each rowdeclare v_xvalue intSELECT max(xvalue) INTO v_xvalue FROM table1WHERE yvalue = :NEW.yvalue AND xvalue = :NEW.xvalue;
This is what I think the conversion will look likeCREATE TRIGGER trigger_sample_MSSQL ON table1 AFTER INSERTAS DECLARE @v_xvalue int, @v_yvalue int BEGIN SELECT v_xvalue = MAX(xvalue) FROM table1 WHERE yvalue = @v_yvalue AND xvalue = @v_xvalue ENDGO
TIA