Mysql problem

Discussion in 'MySQL' started by ForgottenCreature, Apr 27, 2006.

  1. #1
    Does anyone see a problem with this query?
    It works on mysql 4.0.25-standard
    But not mysql 4.1.18-standard

    This is the query:
    
    DROP TABLE IF EXISTS ms_train;
    CREATE TABLE ms_train (
      id int(10) NOT NULL auto_increment,
      on int(10) NOT NULL default '0',
      PRIMARY KEY  (id)
    ) TYPE=MyISAM;
    
    Code (markup):

     
    ForgottenCreature, Apr 27, 2006 IP
  2. vishwaa

    vishwaa Well-Known Member

    Messages:
    271
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    138
    #2
    this is because you try to use the reserved word in mysql.
    http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html

    use something else other than 'on'. it must work.
     
    vishwaa, Apr 27, 2006 IP
  3. ForgottenCreature

    ForgottenCreature Notable Member

    Messages:
    7,473
    Likes Received:
    173
    Best Answers:
    0
    Trophy Points:
    260
    #3
    Thanks for the help, Vishwaa, I appreciate it! :)
     
    ForgottenCreature, Apr 27, 2006 IP