Home > database >  ORACLE trigger how to write
ORACLE trigger how to write

Time:02-26

In SQL trigger is as follows:
CREATE the TRIGGER ZDY_SCDD_KHMC
For INSERT, UPDATE ON SCDDCP

The begin
Udpate SCDD set scdd_xsdd scddcp_lydjbh, scdd_khmc=XSdd_shdkhmc from XSDD, inserted where scddcp_scddlsbh=scdd_lsbh and scddcp_lylsbh=xsdd_ddls. An scddcp_lylsbh & lt;> "';

end;
In oracle, this not line, should be how to write, please?
The CREATE OR REPLACE the TRIGGER ZDY_SCDD_KHMC
AFTER the INSERT OR UPDATE ON SCDDCP
FOR EACH ROW
The begin

If not updating then
Udpate SCDD set scdd_xsdd=: new scddcp_lydjbh, scdd_khmc=XSdd_shdkhmc from XSDD, : new where clause: new. Scddcp_scddlsbh=scdd_lsbh and: new. Scddcp_lylsbh=xsdd_ddls and: new. Scddcp_lylsbh & lt;> "';
end if;
end;

CodePudding user response:

Structure is to don't know: new can have influence

CodePudding user response:

After creating an error, no
  • Related