Reputation: 8836
On phpMyAdmin, when I create this table the SQL is executed correctly but when I add all the sql code I get an error saying
"#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 'CREATE TABLE
buying(
CustomerIDint(10) unsigned NOT NULL,
PurchaseI' at line 14`"
Why is that and how can I fix it ?
Upvotes: 0
Views: 55
Reputation: 72991
If you are running multiple SQL statements, they need to be ended with a ;
(semi-colon)
Upvotes: 1
Reputation:
You have to use a semicolon ;
after each CREATE TABLE sometable ( )
statement.
CREATE TABLE `table1` (
...
);
CREATE TABLE `table2` (
...
);
Upvotes: 3