MySQL 1064 Error Creating a Linking Table (Many-to-Many)

XYZ Rose

I'm trying to understand why a parsing error occurred (1064) with the following code.

<#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 '' at line 3>

CREATE TABLE Party_Library
(
    Party INT(11)
    Library varchar(40)
    PRIMARY KEY (Library,Party)
    FOREIGN KEY (Party) REFERENCES Party(PartyKey) ON DELETE CASCADE
    FOREIGN KEY (Library) REFERENCES MusicLibraries(MusicSource) ON DELETE CASCADE
)
John Conde

You are missing commas after each declaration:

CREATE TABLE Party_Library
(
    Party INT(11),
    Library varchar(40),
    PRIMARY KEY (Library,Party),
    FOREIGN KEY (Party) REFERENCES Party(PartyKey) ON DELETE CASCADE,
    FOREIGN KEY (Library) REFERENCES MusicLibraries(MusicSource) ON DELETE CASCADE
);

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

MySQL error #1064 when creating table

From Dev

ERROR 1064 in mysql query for creating table

From Dev

ERROR 1064 (42000) creating table in mysql

From Dev

creating table but return "too many value" error

From Dev

MYSQL Table Error - 1064

From Dev

Mysql - Is there a way to query a many-to-many relationship and include rows not in the linking table?

From Dev

Error creating MySQL function (1064)

From Dev

MySQL "many to many" relation error

From Dev

Creating many to many junction table in Entity Framework

From Dev

Sequelize not creating join table many-to-many

From Dev

Creating many to many junction table in Entity Framework

From Dev

Creating one to many relationship with pivot table of many to many relationship

From Dev

Creating one to many relationship with pivot table of many to many relationship

From Dev

Adding Index when Creating a Table Error 1064

From Dev

saveOrUpdate many-to-many table with Hibernate + MySQL

From Dev

Remove duplicate rows on many to many table (Mysql)

From Dev

Remove duplicate rows on many to many table (Mysql)

From Dev

MySQL: Counting instances in many-to-many table

From Dev

Insert into Many to Many Table - Node JS MySQL

From Dev

mysql syntax ERROR 1064 while creating a trigger

From Dev

Getting a MYSQL 1064 error when creating a function

From Dev

MySQL error #1064 while creating stored procedure

From Dev

mysql error 1064 when creating table. What can I check for?

From Dev

Mysql - search in "one to many" table

From Dev

Mysql - search in "one to many" table

From Dev

Mysql redesign table with many columns

From Dev

need help creating a simple many-to-many relationship using mysql

From Dev

MySQL table creating error

From Dev

MySQL creating table error

Related Related

  1. 1

    MySQL error #1064 when creating table

  2. 2

    ERROR 1064 in mysql query for creating table

  3. 3

    ERROR 1064 (42000) creating table in mysql

  4. 4

    creating table but return "too many value" error

  5. 5

    MYSQL Table Error - 1064

  6. 6

    Mysql - Is there a way to query a many-to-many relationship and include rows not in the linking table?

  7. 7

    Error creating MySQL function (1064)

  8. 8

    MySQL "many to many" relation error

  9. 9

    Creating many to many junction table in Entity Framework

  10. 10

    Sequelize not creating join table many-to-many

  11. 11

    Creating many to many junction table in Entity Framework

  12. 12

    Creating one to many relationship with pivot table of many to many relationship

  13. 13

    Creating one to many relationship with pivot table of many to many relationship

  14. 14

    Adding Index when Creating a Table Error 1064

  15. 15

    saveOrUpdate many-to-many table with Hibernate + MySQL

  16. 16

    Remove duplicate rows on many to many table (Mysql)

  17. 17

    Remove duplicate rows on many to many table (Mysql)

  18. 18

    MySQL: Counting instances in many-to-many table

  19. 19

    Insert into Many to Many Table - Node JS MySQL

  20. 20

    mysql syntax ERROR 1064 while creating a trigger

  21. 21

    Getting a MYSQL 1064 error when creating a function

  22. 22

    MySQL error #1064 while creating stored procedure

  23. 23

    mysql error 1064 when creating table. What can I check for?

  24. 24

    Mysql - search in "one to many" table

  25. 25

    Mysql - search in "one to many" table

  26. 26

    Mysql redesign table with many columns

  27. 27

    need help creating a simple many-to-many relationship using mysql

  28. 28

    MySQL table creating error

  29. 29

    MySQL creating table error

HotTag

Archive