Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Sequences, last_insert_id, SQLite, and Oracle

by Ben Win Lue (Friar)
on Jun 14, 2005 at 11:53 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://466487]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2024-04-24 12:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found