Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1954

Create a row, use id as value in another row? (2 replies)

$
0
0
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?

Viewing all articles
Browse latest Browse all 1954

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>