Thread: How to get sequence info?

How to get sequence info?

From
"Gary Greenberg"
Date:

I need to find out what sequences were created in the database.

Does anyone know how to do it?

I can get info on tables, keys, columns from DatabaseMetadata, but I don’t see any means to retrieve sequence info.

If you know how, please give me a tip.

Regards,

            Gary

Re: How to get sequence info?

From
Kris Jurka
Date:

On Fri, 4 May 2007, Gary Greenberg wrote:

> I need to find out what sequences were created in the database.
>
> Does anyone know how to do it?

Sequences are returned as tables with a TABLE_TYPE of SEQUENCE, so you can
say:

DatabaseMetaData.getTables("%","%","%", new String[]{"SEQUENCE"});

Kris Jurka