Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle trigger-record modification history

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Select * from ordtaskremeb_log

Create table ordtaskremeb_log

(

Timeinfo varchar (50)

Oldeqid varchar (20)

Neweqid varchar (20)

Folderno varchar (50)

Ordno varchar (50)

Testno varchar (50)

L_type varchar (20))

CREATE OR REPLACE TRIGGER ordtask_eqid_TRIGGER

AFTER UPDATE of eqid ON ordtask

For each row

DECLARE

V_TYPE ordtaskremeb_log.L_TYPE%TYPE

BEGIN

IF INSERTING THEN

-- INSERT trigger

V_TYPE: = 'INSERT'

ELSIF UPDATING THEN

-- UPDATE trigger

V_TYPE: = 'UPDATE'

END IF

INSERT INTO ordtaskremeb_log (timeinfo,oldeqid,neweqid,folderno,ordno,testno,l_type)

VALUES

(TO_CHAR (SYSDATE, 'yyyy-mm-dd hh34:mi:ss'),: old.eqid,:new.eqid,:old.folderno,:old.ordno,:old.testno,V_TYPE);-- USER represents the current user name

END ordtask_eqid_TRIGGER

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report