How can I get all sequences in an Oracle database?

SqlDatabaseOracleSequenceToad

Sql Problem Overview


Is there any command that I can run so that I can get all the sequences? I am using Oracle 11g. I am using Toad for Oracle to connect to it. I can visually see the sequences in Toad, but I like to know the command line for it.

Sql Solutions


Solution 1 - Sql

select sequence_owner, sequence_name from dba_sequences;


DBA_SEQUENCES -- all sequences that exist 
ALL_SEQUENCES  -- all sequences that you have permission to see 
USER_SEQUENCES  -- all sequences that you own

Note that since you are, by definition, the owner of all the sequences returned from USER_SEQUENCES, there is no SEQUENCE_OWNER column in USER_SEQUENCES.

Solution 2 - Sql

You may not have permission to dba_sequences. So you can always just do:

select * from user_sequences;

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsheidaeiView Question on Stackoverflow
Solution 1 - SqlMark J. BobakView Answer on Stackoverflow
Solution 2 - SqlPete B.View Answer on Stackoverflow