如何显示刚刚发生的MySQL警告?
要显示 MySQL 警告,您可以使用以下语法 -
SHOW WARNINGS;登录后复制
这是显示警告的查询 -
mysql> SHOW WARNINGS;登录后复制
+-------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Error | 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 'QUERY CACHE' at line 1 | +-------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)登录后复制