LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MySQL syntax problem (https://www.linuxquestions.org/questions/linux-software-2/mysql-syntax-problem-352381/)

Hydrap 08-11-2005 10:21 PM

MySQL syntax problem
 
HI,
I want to import a database to MySQL in Linux. However, when I tried to create table the following error occurs:


ERROR 1064 at line 21: You have an error in your SQL syntax near ') ENGINE=InnoDB DEFAULT CHARSET=latin1' at line 7


The related code is here:

DROP TABLE IF EXISTS `affy_feature`;
CREATE TABLE `affy_feature` (
`affy_feature_id` int(11) NOT NULL auto_increment,
`seq_region_id` int(10) unsigned NOT NULL default '0',
`seq_region_start` int(11) NOT NULL default '0',
`seq_region_end` int(11) NOT NULL default '0',
`seq_region_strand` tinyint(4) NOT NULL default '0',
`mismatches` tinyint(4) default NULL,
`affy_probe_id` int(11) NOT NULL default '0',
`analysis_id` int(11) NOT NULL default '0',
PRIMARY KEY (`affy_feature_id`),
KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`),
KEY `probe_idx` (`affy_probe_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


Should I change the code Or use other method to create the table?

Matir 08-11-2005 10:49 PM

I believe its "DEFAULT CHARACTER SET", not "DEFAULT CHARSET". (Source: http://dev.mysql.com/doc/mysql/en/create-table.html)


All times are GMT -5. The time now is 09:22 PM.