File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "list of sequences" Watch "list of sequences" New topic
Author

list of sequences

vivek ja
Ranch Hand

Joined: Feb 24, 2005
Posts: 80
Hi,

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

Thanks,

Vivek
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

Vivek,
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
Greenhorn

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
    
    1


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
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: list of sequences