MySql一个未设置成功的触发器
Posted 长亭古道读人生
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySql一个未设置成功的触发器相关的知识,希望对你有一定的参考价值。
create table aa as
SELECT merchant_no,merchant_name from v2.transaction_detail_202011 where DATE_FORMAT(trans_time,'%d')=30;
create table bb as
SELECT merchant_no,order_no from v2.transaction_detail_202011 where DATE_FORMAT(trans_time,'%d')=30;
create table cc as
SELECT order_no,trans_amount from v2.transaction_detail_202011 where DATE_FORMAT(trans_time,'%d')=30;
create table dd as
SELECT order_no,trans_time from v2.transaction_detail_202011 where DATE_FORMAT(trans_time,'%d')=30;
DELIMITER $
CREATE trigger aabb_delete
on aa
for delete
as
begin
delete bb where merchant_no in (select merchant_no from deleted);
End$
CREATE trigger bbcd_delete
on bb
for delete
as
begin
delete cc where order_no in (select order_no from deleted);
delete dd where order_no in (select order_no from deleted);
End$
DELIMITER ;
CREATE trigger aabb_delete
on aa
for delete
as
begin
delete bb where merchant_no in (select merchant_no from deleted);
End
> 1064 - You have an error in your SQL syntax; check the manual that corresponds to your mysql server version for the right syntax to use near 'on aa
for delete
as
begin
delete bb where merchant_no in (select merchant' at line 2
> 时间: 0s
这个问题只能留着以后再来研究了。先mark一下!
以上是关于MySql一个未设置成功的触发器的主要内容,如果未能解决你的问题,请参考以下文章
如何设置 vscode 的代码片段,以便在自动完成后自动触发 vscode 的智能感知?
错误代码:错误域 = NSCocoaErrorDomain 代码 = 3840“JSON 文本没有以数组或对象和允许未设置片段的选项开头。”