title: How to batch insert into two tables with one's id is another's foreign key?
body: <p>There are two tables. Table User has columns as below</p>
  
  <pre><code>ID,NAME,AGE
  </code></pre>
  
  <p>And Table Asset has columns as below</p>
  
  <pre><code>ID,ID_USER,PRICE
  </code></pre>
  
  <p>Asset's ID_USER is the ID of User.</p>
  
  <p>Table User's id uses sequece seq_t_user.
  Table Asset's id uses sequece seq_t_asset.</p>
  
  <p>Now There are 1000000 users waiting to be inserted. We can use for loop to process every record seperately. </p>
  
  <p><code>v_id_user = seq_t_user.nextval();
  insert into User values(v_id_user, 'Lilie', 20);
  insert into Asset values(seq_t_asset.nextval(), v_id_user, 1000);</code></p>
  
  <p>But this is very time consuming. Is there any way to batch insert into two tables at the same time?</p>