检查记录是否已插入数据库表

时间:2022-09-15 16:43:00

I need to check if a record has been inserted into the table , if yes I have to retrieve specific information and search in the second table .Please tell me the proper way to search the second table as soon as a record arrives in the first table.

我需要检查一条记录是否已插入表中,如果是,我必须检索特定信息并在第二个表中搜索。请告诉我一旦记录到达第一个表中就能搜索第二个表的正确方法。

Thanks in Advance

提前致谢

1 个解决方案

#1


0  

Not sure, what exactly are you looking for. Are you looking for Triggers in your database, which will get fires as soon as record is inserted?

不确定,你究竟在寻找什么。您是否在数据库中寻找触发器,一旦插入记录就会触发?

CREATE
[DEFINER = { user | CURRENT_USER }]
TRIGGER trigger_name trigger_time trigger_event
ON tbl_name FOR EACH ROW trigger_body

#1


0  

Not sure, what exactly are you looking for. Are you looking for Triggers in your database, which will get fires as soon as record is inserted?

不确定,你究竟在寻找什么。您是否在数据库中寻找触发器,一旦插入记录就会触发?

CREATE
[DEFINER = { user | CURRENT_USER }]
TRIGGER trigger_name trigger_time trigger_event
ON tbl_name FOR EACH ROW trigger_body