In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
-- Create table a trigger
Create table T_AC_TEST
(
ID VARCHAR2 (32) not null primary key
AT_SWITCH CHAR (1)
AT_UPDATE_TIME DATE
AT_UPDATE_MAN VARCHAR2 (50)
)
-- add several pieces of data
Select * from t_ac_test for update
-- verify the trigger to create a new b table
Create table T_AC_TEST1
(
ID VARCHAR2 (32) not null primary key
AT_SWITCH CHAR (1)
AT_UPDATE_MAN VARCHAR2 (50)
)
-- add several pieces of data
Select * from T_AC_TEST1 for update
-- create a trigger. The corresponding function is that when the content of table an is modified, table b saves the modified contents of table a.
Create or replace trigger tri_ins_EST_MOTHERFUCKER-create trigger
After update-modified operation
On ACT.t_Ac_Test-the table after on is the table to be modified act is the table to be modified by the owner of the table t _ ac_test
For each row-indicates that the row-level trigger is created
Begin
Insert into ACT.t_Ac_Test1 (ID,AT_SWITCH,AT_UPDATE_MAN)
Values
(: NEW. ID
: NEW.AT_SWITCH
: NEW.AT_UPDATE_MAN)
End
-- create a trigger
Create or replace trigger tri_test--
Before delete--
On ACT.t_Ac_Test-- on act t _ ac_test
For each row
Begin
Insert into ACT.t_Ac_Test1 (ID,AT_SWITCH,AT_UPDATE_MAN)
Values
(: NEW. ID
: NEW.AT_SWITCH
: NEW.AT_UPDATE_MAN)
End
-- query statements for 2 tables
Select * from t_ac_test1
Select * from t_ac_test
Modify table a trigger stone execution and check whether the contents of table b have fields modified by table a
Update T_AC_TEST t set t.at_update_man =''where t. Id =' 4028810f3bb26aa2013bb2babe450099'
Delete from t_ac_test where id = '4028810f3bb26aa2013bb2babe450088'
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.