3 Replies Latest reply on Feb 2, 2012 9:30 AM by 913622

    find min and max sequence through select

    896188
      Hi,

      Can you give me select query where i can find min value and max value of sequence created.please provide sql statement.
        • 1. Re: find min and max sequence through select
          sb92075
          893185 wrote:
          Hi,

          Can you give me select query where i can find min value and max value of sequence created.please provide sql statement.
          query all_sequences
          SQL> desc all_sequences
           Name                            Null?    Type
           ----------------------------------------- -------- ----------------------------
           SEQUENCE_OWNER                   NOT NULL VARCHAR2(30)
           SEQUENCE_NAME                       NOT NULL VARCHAR2(30)
           MIN_VALUE                             NUMBER
           MAX_VALUE                             NUMBER
           INCREMENT_BY                       NOT NULL NUMBER
           CYCLE_FLAG                             VARCHAR2(1)
           ORDER_FLAG                             VARCHAR2(1)
           CACHE_SIZE                       NOT NULL NUMBER
           LAST_NUMBER                       NOT NULL NUMBER
          Handle:      893185
          Status Level:      Newbie
          Registered:      Oct 25, 2011
          Total Posts:      97
          Total Questions:      41 (23 unresolved)

          why so many unanswered questions?

          Edited by: sb92075 on Jan 27, 2012 3:05 PM
          1 person found this helpful
          • 2. Re: find min and max sequence through select
            select sequence_owner, sequence_name, min_value, max_value, last_number from all_sequences order by sequence_owner, sequence_name;
            • 3. Re: find min and max sequence through select
              913622
              Hi,

              Please use below query to find sequence's Min/Max values.

              SELECT * FROM USER_SEQUENCES WHERE SEQUENCE_NAME = 'ENTER_YOUR_SEQUENCE_NAME'

              Regards,
              Bhavin Patel