Oracle PL/SQL Tutorial/Sequences/Sequence Information — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 13:45, 26 мая 2010
Get Sequence information from user_sequences table
SQL> CREATE SEQUENCE test_seq
2 START WITH 10 INCREMENT BY 5
3 MINVALUE 10 MAXVALUE 20
4 CYCLE CACHE 2 ORDER;
Sequence created.
SQL>
SQL> select * from user_sequences where sequence_name="TEST_SEQ";
SEQUENCE_NAME MIN_VALUE MAX_VALUE INCREMENT_BY C O CACHE_SIZE LAST_NUMBER
------------------------------ ---------- ---------- ------------ - - ---------- -----------
TEST_SEQ 10 20 5 Y Y 2 10
SQL>
SQL>
SQL> drop sequence test_seq
Getting Information on Sequences
You get information on your sequences from user_sequences.
SQL> desc user_sequences;
Name Null? Type
------------------
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