MySQL Forums
Forum List  »  InnoDB

Create a row, use id as value in another row?
Posted by: Don Ireland
Date: December 22, 2015 08:35PM

Given the following table, is there a way to use a subquery in an insert statement? I need to have the subquery insert a row. The autoincrement field (`id`) is used to set the value of the parentID field in a second row created via the main portion of the query?

Don

Options: ReplyQuote


Subject
Views
Written By
Posted
Create a row, use id as value in another row?
1498
December 22, 2015 08:35PM


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.