我在MySql 4.0.16 里怎么没错呢?

解决方案 »

  1.   

    建立名为snuo_bgclass的数据表,字段filmclassid类型为int长度10、非空、自动增加
    classname字段类型char长度20 非空
    关键字filmclassid
      

  2.   

    `classname` char(20) NOT NULL default '',会不会出错?
      

  3.   

    `classname` char(20) NOT NULL default '',会不会出错?
    有道理
      

  4.   

    AUTO_INCREMENT=6  去掉试试。
      

  5.   

    执行结果:
    C:\>cd mysqlC:\mysql>cd binC:\mysql\bin>mysql -use=root
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 3 to server version: 4.0.18-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> use movie6
    Database changed
    mysql> create table 'snuo_bgclass' (
        -> 'filmclass' int(10) unsigned not null auto_increment,
        -> 'classname' char(20) not null default '',
        -> primary key ('filmclassid')
        -> )TYPE=MyISAM AUTO_INCREMENT=6;ERROR 1064: You have an error in your SQL syntax.  Check the manual that corresp
    onds to your MySQL server version for the right syntax to use near ''snuo_bgclas
    s' (
    'filmclass' int(10) unsigned not null auto_inc
    mysql>
      

  6.   

    create table snuo_bgclass去掉引号看看
      

  7.   

    我用的是:mysql-4.0.18-win
    我第一次用的,不知道,谢谢.