使用mysql时报错

使用mysql时出现错误:ERROR 1064 (42000): 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 ‘notexists asIdol’ at line 1

这种异常一般就是sql语句写的有问题,比如这种create database if notexists asIdol;其中not和exists之间的空格没打出来
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your-小白菜博客
加入空格就完美执行了在这里插入图片描述

参考文章: