Results 1 to 2 of 2
  1. #1
    Join Date
    May 2007

    Foreign Key Constraints

    I'm having trouble setting up my foreign key on my table, maybe I'm doing something wrong.

    I am using a database management software, navicat. i have just setup my tables with all the fields and have already identified their respective primary keys, but i havent identified my foreign keys through the navicat yet.

    what happens is that, when i try to create my foreign keys, i get an error from navicat that says something about my constraints. and i end up not being able to create my foreign keys.

    i might have a system design flaw somewhere, but all i can think of is that maybe you cant use the primary key of a table as a foreign key of another table? because thats what i did.

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    create an index on the foreign key first | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts