• Post Reply Bookmark Topic Watch Topic
  • New Topic

oracle insert with a nextVal from dual

 
Nick Potter
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, i'm trying to insert into an oracle db a new row like this:



How do I use the nextVal since the sequence is created specially to populate a column whenever a new user is inserted?
I'm trying to achieve something like MySql's autoincrement

Nevermind, i got it...
 
Jan Cumps
Bartender
Posts: 2620
14
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use nextval directly. No need to select it from dual:
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!