Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://466487]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2016-12-10 13:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (163 votes). Check out past polls.