CREATE DATABASE IF NOT EXISTS 'shop';
完全照著輸入就是報錯??!救命!??!
CREATE DATABASE IF NOT EXISTS 'shop';
USE 'shop';
反饋是:
MySQL 返回:文檔
#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 ''shop'' at line 1
2018-04-12
mysql> CREATE DATABASE IF NOT EXISTS ?`tzb`/*!40100 DEFAULT CHARACTER SET utf8mb4 */;
Query OK, 1 row affected
這是為什么呀?
2016-09-23
為什么你們的方法我都試過了,還是報錯!
2016-04-25
樓上所言極是:
create table imooc_admin(
`id` tinyint(1) unsigned auto_increment key,
`username` varchar(20) not null unique,
`password` varchar(32) not null,
`email` varchar(50) not null
);
2015-06-01
我也遇到了這個問題,樓主你的'shop'就錯了,如果是照著老師弄的話應該是`shop`;?就是Tab鍵上面的那個鍵,
2015-05-31
這個你照著老師的弄有點問題的 ?跟你當初安裝數據庫好像有個模糊度的選擇項有關,你把單引號去了 ?全部不用單引號應該就行了,我也遇到過這問題···