|
|
Question : MySQL error in SQL syntax
|
|
|
|
Hello experts
I am trying to import an MySQL dump file but keep getting this error:
#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 'int(11) NOT NULL default '0', ch_date varchar(50) NOT NULL default '0', ch' at line 26
I canĀ“t seem to find my error, please help?
The query:
CREATE TABLE stocktrans ( id int(11) NOT NULL auto_increment, varenr varchar(50) NOT NULL default '', dato_start varchar(20) NOT NULL default '', dato_end varchar(20) NOT NULL default '', antal int(11) NOT NULL default '0', status tinyint(1) NOT NULL default '0', str varchar(50) NOT NULL default '0', farve varchar(50) NOT NULL default '0', sticker tinyint(1) NOT NULL default '0', pris double(10,5) NOT NULL default '0.00000', valuta varchar(10) NOT NULL default '', kurs double(10,3) NOT NULL default '0.000', nummer varchar(20) NOT NULL default '0', linienr int(11) NOT NULL default '0', bruger varchar(50) NOT NULL default '', varebes text NOT NULL, lagersted varchar(20) NOT NULL default '', brand varchar(20) NOT NULL default '0', belob double(10,2) NOT NULL default '0.00', posttype int(11) NOT NULL default '0', kostpris double(12,2) NOT NULL default '0.00', kostbelob double(12,2) NOT NULL default '0.00', restantal int(11) NOT NULL default '0', leveret int(11) NOT NULL default '0', check int(11) NOT NULL default '0', ch_date varchar(50) NOT NULL default '', ch_name varchar(50) NOT NULL default '', mother varchar(25) NOT NULL default '', PRIMARY KEY (id), KEY varenr (varenr) ) TYPE=MyISAM AUTO_INCREMENT=19650 ;
|
|
|
|
Answer : MySQL error in SQL syntax
|
|
check is a reserved word, either
`check` int(11) NOT NULL default '0',
or change the name
|
|
|
|