删除

时间:2015-11-11 02:26:00

标签: mysql triggers

是否可以先查询并计算行数并将其用作条件并发送邮件通知。

我的视觉代码是这样的:

Create Trigger test After Delete on table
   for each row
   Begin 
     Select count(*) as result from table
        if result = 0 then
          set column1 = 'empty'
          --or send mail if possible much better
        else:
          set column1 = 'full'
          --or send mail if possible much better
   End;

任何建议或评论,提前致谢。

0 个答案:

没有答案