Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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?
NodeReaper cleans and fillets

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-05-29 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?