Jump to content
The Uniform Server Community

Foreign Keys


carlyman
 Share

Recommended Posts

When creating a table with foreign key constraints, the table is created successfully; however, the constraints don't hold true. For example, when inserting values into the new table, the values inserted should match the referenced values. This is not happening.

 

Here is an example of my statement:

CREATE TABLE test (a int, b int, c int, FOREIGN KEY (a,B) REFERENCES test2(e,f))

 

Would the Uniform Server package be affecting this at all? Or, perhaps I am dong something wrong?

 

Thanks for your help,

JC

Link to comment
Share on other sites

I do not think it is the Uniform Server. I use KEYs a lot, and mostly PRIMARY KEYs but everything works fine. It may also depend on the version of MySQL running... Please look into that.. or test it with an example from the MySQL site/doc.

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...