amonotod [mailto:[EMAIL PROTECTED] wrote:
> 
> >    SELECT [sequence name].NEXTVAL as my_seq_nextval FROM dual
> 
> Playing devils' advocate, in a busy environment there's no guarantee that
> the result of that query is the value that will be used for the subsequent
> insert.  The query with the returning clause would be more reliable, from
> that standpoint...

I think you misunderstood.  You take the selected value and use it in the
insert statement:

my $id = $dbh->selectrow_array($next_id_sth);

$ins_sth->execute($id);


Ronald


Reply via email to