Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Sequences, last_insert_id, SQLite, and Oracle

by Ben Win Lue (Friar)
on Jun 14, 2005 at 11:53 UTC ( #466487=note: print w/ replies, xml ) Need Help??


in reply to Sequences, last_insert_id, SQLite, and Oracle

Talking about Oracle and not working in a multiuser-environment, getting the last_insert_id is as easy as this:

select myseq.currval from dual;

with

  • "myseq" being the Sequence you using
  • "dual" is a table offered by oracle, that has always one entry
  • ".currval" is the current value of the Sequence

Comment on Re: Sequences, last_insert_id, SQLite, and Oracle
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://466487]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2014-11-28 23:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (200 votes), past polls