Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to know what sequence a table is using?
cyc73 wrote:
> Hi,
>
> Does anyone know how can I know what sequence is being used in a table?
> I know I can get a full list of sequence from ALL_SEQUENCE or
> USER_SEQUENCE. But how do I know which sequence is associate with
> which table? Thank you.
>
> Crystal
You don't. Sequences are not associated with tables. You *might* find that there's a trigger on that table that makes use of that sequence.
>From a SQL*Plus prompt, try:
SQL> select trigger_body from dba_triggers
where owner='<schema_name>' and table_name='<table_name>';
Also, Oracle encourages the use of sensible naming conventions so *hopefully* there should be a clue in the sequence's name.
HTH -g Received on Thu Jan 18 2007 - 09:14:13 CST