由于语法不正确,可能会出现数据库错误 #1064。例如,假设我们正在创建下表 -
mysql> create table DemoTable ( UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, UserName varchar(100), UserAge int, UserAddress varchar(200), UserCountryName varchar(100) , isMarried boolean, );
这将产生以下输出,即错误 -
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 ')' at line 10
要消除上述错误,您需要删除最后一个逗号(,)。查询如下以消除错误 -
mysql> create table DemoTable ( UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, UserName varchar(100), UserAge int, UserAddress varchar(200), UserCountryName varchar(100), isMarried boolean ); Query OK, 0 rows affected (1.04 sec)
以上就是修复 MySQL 数据库错误 #1064?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号