Reputation: 1217
What is wrong with this statement?
CREATE TABLE `CSV_DB`.`bavaria_test` (
`Schule`,
`Stasse`,
`Ort`,
`Tel`,
`Schulgliederung`,
`Integrationsklasse`,
`Besonderheit`,
`Homepage`,
`E-Mail`,
`Schulnummer`,)
ENGINE = MYISAM ;
#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 '
Stasse
,Ort
,Tel
,Schulgliederung
,Integrationsklasse
,Besonde
at line 2
Upvotes: 2
Views: 123
Reputation: 4827
Assuming you are using MySQL because of ENGINE = MYISAM
:
You must read this. You are forgetting to specify the types of each column and you have a extra comma here 'Schulnummer',)
.
Upvotes: 2
Reputation: 78850
You need to specify the data types for the columns. Also, you don't need those back-tick quotes:
CREATE TABLE bavaria_test (
Schule int,
Stasse varchar(100),
-- etc.
)
Upvotes: 4
Reputation: 17041
You've defined your column names but not given the columns a data type.
For example, Schule could be defined like:
Schule
varchar(50)
which would indicate that the column is a "string" that can hold up to 50 characters.
Upvotes: 2
Reputation: 30111
The columns are missing data types.
The last column has a extra comma at the end
Upvotes: 3
Reputation: 16708
Remove the trailing comma after Schulnummer
. That comma tells it there will be another column in the list, and there is not.
Upvotes: 2