2024-10-14T16:21:16.837007+08:00 2651 Query INSERT INTO test.t1 values (1,1,1,1)
2024-10-14T16:21:16.839500+08:00 2651 Query INSERT INTO t2(c1) values(NEW.c1)
...
复制代码
可以看到当我们实行了 INSERT INTO test.t1 语句后紧接着自动实行 INSERT INTO t2(c1) 语句,因为t2表没有c1列,所以报错 Unknown column 'c1'。
5.查看当前表涉及的触发器
greatsql> SELECT TRIGGER_SCHEMA,TRIGGER_NAME,EVENT_OBJECT_SCHEMA,EVENT_OBJECT_TABLE,ACTION_STATEMENT FROM INFORMATION_SCHEMA.TRIGGERS WHERE EVENT_OBJECT_TABLE='t1';