0

I have created one procedure, inside that i have sequence too, here when i am calling the procedure some insert will table in table..

But if i call the procedure again and again it should delete the records and insert again the current records because its temporary table every time when i call the procedure it will delete and reinsert the record..

Here what i need is - to reset the sequence for example: for 1st time seq is 1 to 600 for 600 records.. again for next time it should start with 1 not from 601

I need to reset the sequence inside the procedure..

Kindly assist

MT0
  • 143,790
  • 11
  • 59
  • 117
Abinnaya
  • 203
  • 4
  • 26
  • 3
    Why do you want to reset the sequence. Sequences are used to generate a unique ID. An id is ultimately an id, be it 1 or 601. It doesn't make sense to reset the sequence again & again. – Ankit Bajpai Nov 01 '21 at 15:07
  • 2
    If it's a temporary table, why does it need a sequence-based column at all? And if you do need an ID-type column, does it really need to come from a sequence, or could it just be a PL/SQL counter or something like rownum depending on how you insert? – Alex Poole Nov 01 '21 at 15:11

0 Answers0