MySQL Forums
Forum List  »  InnoDB

Foreign Keys that reference Auto Incrementing Primary Keys
Posted by: Twon hill
Date: September 23, 2008 05:50PM

I have two tables (well more than two table but for the purpose of the question i'll keep it short). In the first table I have a field that is a auto increment primary key column. In the next table, I want to use the auto increment primary key from table one as the foreing key for table two. I seem to be running into problems with how it is being referenced as a foreing key. I am wondering what is the proper way to reference a auto increment key so that the key number is transfered to the next table not recreated as a new key value ( independent of what it was in the table that it came from). I ask this because I seem to be running into trouble with creating this table I am trying out.

Thank You

Options: ReplyQuote


Subject
Views
Written By
Posted
Foreign Keys that reference Auto Incrementing Primary Keys
8934
September 23, 2008 05:50PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.