Update SQL.md

mysql 5.7.18 中, 触发器不允许返回结果集.
This commit is contained in:
Alpha2J 2018-05-07 10:25:45 +08:00 committed by GitHub
parent f82827dd77
commit ab846658ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -603,7 +603,10 @@ INSERT 触发器包含一个名为 NEW 的虚拟表。
```sql
CREATE TRIGGER mytrigger AFTER INSERT ON mytable
FOR EACH ROW SELECT NEW.col;
FOR EACH ROW SELECT NEW.col into @result;
-- 获取结果
SELECT @result;
```
DELETE 触发器包含一个名为 OLD 的虚拟表,并且是只读的。