Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Creating A Failed Foreign Key Relationship

forums forums SQLyog SQLyog: Bugs / Feature Requests Creating A Failed Foreign Key Relationship

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #22145
      peterlaursen
      Participant

      Well yes .. and .. no

      Wiht MySQL 5 you still need to have created an index on the referenced column (in the other table) in advance. But the index on the FK-column itself is created by MySQL itself if it is not there in advance.

      So when you try to reference a column in another table that has no index, building the FK would fail and an error msg. should show. But it could be more specific.

      But actually SQLyog DOES NOT prevent building the FK if the index on the FK-column is not there!

    • #22146
      scottah
      Member

      Ahh k. Fair enough!

Viewing 1 reply thread
  • You must be logged in to reply to this topic.