按照代碼創(chuàng)建的數(shù)據(jù)表 ,下邊是源碼 和錯(cuò)誤提示
[SQL] CREATE TABLE user(
'uid' int(10) AUTO_INCREMENT PRIMARY KEY COMMENT '用戶ID',
'username' varchar(30) NOT NULL DEFAULT '' COMMENT '用戶名',
'password' char(6) NOT NULL DEFAULT '' COMMENT '密碼',
'sex' char(2) NOT NULL DEFAULT '保密' COMMENT '性別',
'email' varchar(40) NOT NULL DEFAULT '' COMMENT '郵箱',
'hobby' varchar(255) NOT NULL DEFAULT '' COMMENT '興趣愛好',
KEY 'username'('username')
)ENGINE=MyISAM DEFAULT CHARSET=UTF8 COMMENT='用戶表';
[Err] 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 ''uid' int(10) AUTO_INCREMENT PRIMARY KEY COMMENT '用戶ID',
'username' varch' at line 3
這是我看筆記創(chuàng)建的數(shù)據(jù)表 ?為什么會(huì)這樣 ?報(bào)錯(cuò)求解
2018-01-02
'uid' int(10)
uid ?兩邊的不是單引號(hào),而是 ? ` ? 鍵盤Tab鍵上面,波浪線鍵那個(gè)鍵下面那個(gè)字符。