MySQL Forums
Forum List  »  Newbie

Re: Unique columns over two tables
Posted by: Rick James
Date: March 31, 2009 08:46PM

Plan A. You INSERT into one table, get the InsertId, use that when you INSERT into the other table. First table has AUTO_INCREMENT, second does not.

Plan B. Create a "sequence number":
http://dev.mysql.com/doc/refman/5.0/en/information-functions.html

Options: ReplyQuote


Subject
Written By
Posted
Re: Unique columns over two tables
March 31, 2009 08:46PM


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.