This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Oracle/OAS and the fly likes list of sequences Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "list of sequences" Watch "list of sequences" New topic

list of sequences

vivek ja
Ranch Hand

Joined: Feb 24, 2005
Posts: 80

How can I find the names of all the sequences in a database?


Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30138

I'm not sure if this would work, but could you try querying the user_objects table for the object_type that represents a sequence?

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

select * from user_sequences
Jigar Patel

Joined: Sep 15, 2009
Posts: 7
If you want to find all Sequence in Data base use
select * from all_sequences;
Vinod Tiwari
Ranch Hand

Joined: Feb 06, 2008
Posts: 459

Above query would only work if your user has select access on the table else you need to check with your DBA.

Vinod Tiwari | Twitter
Martin Vajsar

Joined: Aug 22, 2010
Posts: 3606

Vinod Tiwari wrote:

Above query would only work if your user has select access on the table else you need to check with your DBA.

By default, users have access to the USER_XXX and ALL_XXX data dictionary views. These views contains information about objects the user owns or has been granted access to, and they are vital for many functions (including Oracle's implementation of the JDBC mechanism for obtaining metadata information), so I doubt they would be unavailable in any Oracle database.
It is sorta covered in the JavaRanch Style Guide.
subject: list of sequences
Similar Threads
sequence creation
Force a string to ignore meta characters
char doubt
quotes that I want in arguments to main
Why cannot declare char c = '\u000a'