到底哪里出錯啊
? ? -> DROP TABLE IF EXISTS `imooc_user`;
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 'DROP TABLE IF EXISTS `imooc_user`' at line 16
mysql> CREATE TABLE `imooc_user`(
? ? -> `id` int unsigned auto_increment key,
? ? -> `username` varchar(20) not null unique,
? ? -> `password` char(32) not null,
? ? -> `sex` enum("man","woman","secret")not null default "secret",
? ? -> `face` varchar(50) not null,
? ? -> `regTime` int unsigned not null
? ? -> )
? ? ->
? ? -> DROP TABLE IF EXISTS `imooc_album`;
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 'DROP TABLE IF EXISTS `imooc_album`' at line 10
mysql> CREATE TABLE `imooc_album`(
? ? -> `id` int unsigned auto_increment key,
? ? -> `pid` int insigned not null,
? ? -> `albumPath` varchar(50) not null
? ? -> )
2017-08-30
1.去掉所有引號·? 2.每個創(chuàng)建表后加; 可以去百度下mysql語句規(guī)則
2017-08-21
我跟你一樣 ? 我也不知道