Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6630841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:27:51+00:00 2026-05-25T22:27:51+00:00

I am writing the launch plan for one of my code. In which, for

  • 0

I am writing the launch plan for one of my code. In which, for each step i have to write a verification step which will tell if the deployment/change has been made properly. Like if there is an alter table command to add a new column then as a verification, I would be using select column_name from table as verification step.

I am looking for a verification step for my sequence script. My sequence scripts is dropping the old sequence and re-creating it with initial value changed. lets say if my last sequece was on 10071 – the new sequece would start from 100710.

I wrote the following query

SELECT LAST_NUMBER 
  FROM all_sequences 
 WHERE sequence_name = 'SEQNAME';

Now, my question is, would that give the last number of my new sequence or the old sequence?

P.S:
I can’t use sequence NextValue – it would cause the system to miss 1 number and will mess up the whole system. However, I am open for the options in which my *next_value* can be utlizied, automatically.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T22:27:51+00:00Added an answer on May 25, 2026 at 10:27 pm

    Now, my question is, would that give the last number of my new sequence or the old sequence?

    Err … Why not just try it as suggested by Randy in the comments ?

    SQL> !cat /tmp/sql.sql
    
    create sequence foo start with 10;
    
    select min_value, max_value, increment_by, last_number
    from user_sequences
    where sequence_name = 'FOO';
    
    drop sequence foo;
    
    create sequence foo start with 20;
    
    select min_value, max_value, increment_by, last_number 
    from user_sequences 
    where sequence_name = 'FOO';
    
    drop sequence foo;
    
    SQL> @/tmp/sql
    
    Sequence created.
    
    
     MIN_VALUE  MAX_VALUE INCREMENT_BY LAST_NUMBER
    ---------- ---------- ------------ -----------
             1 1.0000E+28            1          10
    
    
    Sequence dropped.
    
    
    Sequence created.
    
    
     MIN_VALUE  MAX_VALUE INCREMENT_BY LAST_NUMBER
    ---------- ---------- ------------ -----------
             1 1.0000E+28            1          20
    
    
    Sequence dropped.
    
    SQL>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a daemon in c++ on linux which would launch many processes.
I am writing my first ever code for AWS. I have downloaded the AWS
I am writing a PHP script that will launch a program on the server.
I'm writing a c# program that will launch many child processes. At some time
Is there any way of writing pexpect like small program which can launch a
I'm writing an application which I want to be able to launch a second
I'm writing preferences for my app which registers it for launch at login (using
I'm writing a WP7 application and I have code to ask the user for
I am writing java code for EC2 that will consume messages from SQS. My
I'm writing a screensaver in C# which should launch an application and then terminate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.