Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: query whether sequences exist

Re: query whether sequences exist

From: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 01 Mar 2006 09:51:07 -0800
Message-ID: <1141235460.401626@jetspin.drizzle.com>


Daniel Wetzler wrote:
> Dear Oracle Experts,
>
> I'M searching for a query to find out whether sequences for auto
> iteration of primary key columns do exist on a table or not.
> Does anyone know how to get that information ?
>
> Best regards,
>
> Daniel Wetzler

Seems likely you don't know what a sequence is because a query as to whether a sequence exists is easy:

SELECT COUNT(*)
FROM user_sequences
WHERE sequence_name = '...';

But what that sequence may or may not be used to do is impossible to discern. Yes you could look at trigger bodies but that may or may not be the location of NEXTVAL.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Wed Mar 01 2006 - 11:51:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US