-
-
-
-
-
-
-
-
扫码关注官方订阅号
-
-
2018-08-07 10:02:20
- mysql触发器问题
- 看了数据库的触发器,就想,如果某个定单表插入的数量大于商品表,那么商品表应该是负数啊,应该加以限制。可是我采用before来限制时,则不能执行,谁帮我看下这串代码哪错了create trigger tg1before insert on ordfor each rowbeginif new.o_num > goods.g_num thenset new.o_num = goods.g_num
-
0
2
1062
-
-
-
显示更多