Jr0x Posted April 17, 2007 Share Posted April 17, 2007 Hi, I have problem while importing sql file into my database. I got the sql file from the server and i have to import it to my local pc. MySQL client version: 5.0.33 When i tries to import, it will gives me this error. Error SQL query: # # Table structure for table '2222881302_reply' # CREATE TABLE 2222881302_reply( id int( 10 ) unsigned NOT NULL AUTO_INCREMENT , mobile decimal( 11, 0 ) NOT NULL default '0', gate int( 5 ) NOT NULL default '0', message varchar( 254 ) NOT NULL default '', time datetime NOT NULL default '0000-00-00 00:00:00', reply enum( 'Y', 'N' ) NOT NULL default 'N', reply_msg text NOT NULL , reply_time datetime NOT NULL default '0000-00-00 00:00:00', agent varchar( 20 ) NOT NULL default '', cmdid varchar( 20 ) NOT NULL default '', SHOW enum( 'Y', 'N' ) NOT NULL default 'Y', method varchar( 40 ) NOT NULL default 'WEB.00', ownerchar( 2 ) NOT NULL default '', user varchar( 20 ) default NULL , dest longtext NOT NULL , total varchar( 10 ) NOT NULL default '0', PRIMARY KEY ( id ) ) TYPE = MYISAM ; MySQL said: Documentation #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 'show enum('Y','N') NOT NULL default 'Y', method varchar(40) NOT NULL default '' at line 12 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- I believe that SHOW is a reserved word ? Therefore, i couldn't use it at my current SQL version. How do i counter this error ? I need some help asap. Thanks. Jr0x Quote Link to comment https://forums.phpfreaks.com/topic/47348-sql-import-file-error/ Share on other sites More sharing options...
bubblegum.anarchy Posted April 17, 2007 Share Posted April 17, 2007 Rename the column or wrap the column name with backticks - ie. `show` Quote Link to comment https://forums.phpfreaks.com/topic/47348-sql-import-file-error/#findComment-231002 Share on other sites More sharing options...
fenway Posted April 20, 2007 Share Posted April 20, 2007 Rename the column or wrap the column name with backticks - ie. `show` Or rename the column. Quote Link to comment https://forums.phpfreaks.com/topic/47348-sql-import-file-error/#findComment-233948 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.