今天公司叫我把我的数据用用FTP用上传,结果老报错,
错误
SQL 查询: CREATE TABLE `company_user` (`user_id` int( 10 ) NOT NULL AUTO_INCREMENT ,
`user_name` varchar( 45 ) NOT NULL ,
`user_info` varchar( 45 ) NOT NULL ,
`user_answer` varchar( 45 ) NOT NULL ,
`user_question` varchar( 45 ) NOT NULL ,
`user_email` varchar( 45 ) NOT NULL ,
`user_level` int( 10 ) NOT NULL ,
`user_password` varchar( 45 ) NOT NULL ,
PRIMARY KEY ( `user_id` ) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT =2 DEFAULT CHARSET = utf8;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 'USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8' at line 10 
但是这个表在我自己的机器是可以跑的,为什么?????

解决方案 »

  1.   

    试一下 PRIMARY KEY USING BTREE ( `user_id` ) 
      

  2.   

    检查一下你的MYSQL的版本。mysql> status;
    --------------
    mysql  Ver 14.14 Distrib 5.1.33, for Win32 (ia32)Connection id:          1
    Current database:       csdn
    Current user:           root@localhost
    SSL:                    Not in use
    Using delimiter:        ;
    Server version:         5.1.33-community-log MySQL Commun
    Protocol version:       10
    Connection:             localhost via TCP/IP
    Server characterset:    latin1
    Db     characterset:    latin1
    Client characterset:    latin1
    Conn.  characterset:    latin1
    TCP port:               3306
    Uptime:                 1 hour 34 min 2 secThreads: 1  Questions: 34  Slow queries: 0  Opens: 21  Fl
    les: 1  Queries per second avg: 0.6
    --------------mysql>
    As of MySQL 5.1.10, index options can be given following the index column list
    Before MySQL 5.1.10, this option can be given only before the ON tbl_name clause.