如何修复 MySQL INSERT INTO(语法错误)?
How to fix MySQL INSERT INTO (Syntax Error)?
这是我的代码
USE `es_extended`;
INSERT INTO `users` (
`license` varchar(50),
`money` int(11),
`bank` int(11),
`permission_level` int(11)
);
每次我尝试将它导入我的数据库时,我都会收到此错误
#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 'varchar(50),
`money` int(11),
`bank` int(11),
`permission_level` int(11)
)' at line 2
这将创建您的 table:
Create table `users` ( `license` varchar(50), `money` int(11), `bank` int(11), `permission_level` int(11) );
要插入你可以这样做:
Insert into `users` ( `license`, `money`, `bank`, `permission_level`) values ('test', 123, 456, 789)
这是我的代码
USE `es_extended`;
INSERT INTO `users` (
`license` varchar(50),
`money` int(11),
`bank` int(11),
`permission_level` int(11)
);
每次我尝试将它导入我的数据库时,我都会收到此错误
#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 'varchar(50),
`money` int(11),
`bank` int(11),
`permission_level` int(11)
)' at line 2
这将创建您的 table:
Create table `users` ( `license` varchar(50), `money` int(11), `bank` int(11), `permission_level` int(11) );
要插入你可以这样做:
Insert into `users` ( `license`, `money`, `bank`, `permission_level`) values ('test', 123, 456, 789)