請問各位大大能不能幫我看看我資料庫有什麼問題 求解 他顯示出這樣的錯誤能幫小弟我看看嗎

edited 五月 2014 in 資料庫
#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 '(1) NOT NULL, `科系` CHAR(4) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NU' at line 1

評論

  • sql 語法錯誤,
    把你的 sql 貼上來吧
  • `問卷編號` CHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
    `學制` CHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
    `學制 其他` VARCHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
    `年級` CHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
    `性別` BOOL( 1 ) NOT NULL ,
    `科系` CHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
    `科系 其他` VARCHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
    `上網時間` CHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
    `上網行為` CHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
    `a1 other` BOOL( 2 ) NOT NULL ,
    `a2 other` BOOL( 2 ) NOT NULL ,
    `a3 other` BOOL( 2 ) NOT NULL ,
    `a4 other` BOOL( 2 ) NOT NULL ,
    `a5 other` BOOL( 1 ) NOT NULL ,
    `a6 other` BOOL( 2 ) NOT NULL ,
    `a7 other` BOOL( 2 ) NOT NULL ,
    `a8 other` BOOL( 2 ) NOT NULL ,
    `a9 other` BOOL( 2 ) NOT NULL ,
    `a10 other` BOOL( 2 ) NOT NULL ,
    `上網地方` CHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
    `上網方式` CHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
    `Q1` BOOL( 1 ) NOT NULL ,
    `Q2` BOOL( 1 ) NOT NULL ,
    `Q3` BOOL( 1 ) NOT NULL ,
    `Q4` BOOL( 1 ) NOT NULL ,
    `Q5` BOOL( 1 ) NOT NULL ,
    `Q6` BOOL( 1 ) NOT NULL ,
    `Q7` BOOL( 1 ) NOT NULL ,
    `Q8` BOOL( 1 ) NOT NULL ,
    `作答時間` DATE NOT NULL ,
    PRIMARY KEY ( `問卷編號` )
    ) ENGINE = MYISAM
  • 欄位名稱不要用中文
  • a1 other
    中間不要有空
  • a1 other` BOOL( 2 ) NOT NULL , 主要都錯在這邊 部要空格一樣錯ㄟ
  • 了解喔 謝謝你 修改完成
Sign In or Register to comment.