nparthi
asked on
View sequence definition
How do I view the sequence definition from SQL prompt?
I want to view the sequence 'definition' of a sequence that I created long ago.
I want to view the sequence 'definition' of a sequence that I created long ago.
take a look at the user_sequences view.
If you are running 9i, you can use:
SQL> SELECT DBMS_METADATA.GET_DDL( 'SEQUENCE','YOUR_SEQUENCE_ NAME','YOU R_SCHEMA') FROM DUAL;
SQL> SELECT DBMS_METADATA.GET_DDL( 'SEQUENCE','YOUR_SEQUENCE_
ASKER
I am using Oracle 8
Try this select statement:
select 'create sequence '||sequence_name||
' increment by '||increment_by||
' start with '||last_number||
' minvalue '||min_value||
' maxvalue '||max_value||' ;'
from all_sequences
where sequence_name='YOUR_SEQ'
select 'create sequence '||sequence_name||
' increment by '||increment_by||
' start with '||last_number||
' minvalue '||min_value||
' maxvalue '||max_value||' ;'
from all_sequences
where sequence_name='YOUR_SEQ'
hi
the dba_sequences table in sys schema will show u all the details regarding the sequences.
regards
annamalai
the dba_sequences table in sys schema will show u all the details regarding the sequences.
regards
annamalai
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.