Home » SQL & PL/SQL » SQL & PL/SQL » Sequence to start with a value known dynamically
Sequence to start with a value known dynamically [message #294362] Thu, 17 January 2008 05:54 Go to next message
hidnana
Messages: 87
Registered: November 2007
Location: chennai
Member
I have a Table A with say x rows. Now I need to load Table B (of same structure) into Table A through a procedure. But the sequence number in Table B should start from x+1 of Table A. I cannot manually edit the sequence start with caluse. How to do it dynamically (through a procedure) ?

[Updated on: Thu, 17 January 2008 05:56]

Report message to a moderator

Re: Sequence to start with a value known dynamically [message #294364 is a reply to message #294362] Thu, 17 January 2008 05:59 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Drop and Re-create the sequence with the new start value.

By
Vamsi
Re: Sequence to start with a value known dynamically [message #294365 is a reply to message #294362] Thu, 17 January 2008 06:06 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
http://www.orafaq.com/forum/m/293484/102589/?srch=sequence#msg_293484
http://www.orafaq.com/wiki/sequence

Regards
Michel

[Updated on: Thu, 17 January 2008 06:07]

Report message to a moderator

Re: Sequence to start with a value known dynamically [message #294425 is a reply to message #294362] Thu, 17 January 2008 09:56 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Reuse table A's sequence.
Previous Topic: duplicate records
Next Topic: An error can any one help me
Goto Forum:
  


Current Time: Sat Feb 15 02:20:30 CST 2025