Home » SQL & PL/SQL » SQL & PL/SQL » Sequence Name (Oracle 10g, Sun Solaris 5.8)
Sequence Name [message #289441] Fri, 21 December 2007 13:24 Go to next message
velav
Messages: 1
Registered: December 2007
Location: USA
Junior Member
Hi,

My Requirement is I know the Table and column name and need to find Is sequence is created for that table or not.. if so need to find the sequence name.

Pls help me out to find the same. DBA_SEQUENCES, ALL_SEQUENCES doesnt helped me out to get these stuffs.

Thanks and Regards,
Velav

Re: Sequence Name [message #289443 is a reply to message #289441] Fri, 21 December 2007 13:30 Go to previous messageGo to next message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
There is no relation between sequence and table in Oracle.
Only YOU know that you associate these ones.
So Oracle can't answer this question.

Regards
Michel
Re: Sequence Name [message #289444 is a reply to message #289441] Fri, 21 December 2007 13:32 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
A sequence is "bound" to a table only by some code in any trigger on that table.

Complicating your search is the fact the TRIGGER_BODY is a LONG.

Therefore you might want search through application source code as stored in your code repository.
Re: Sequence Name [message #289445 is a reply to message #289444] Fri, 21 December 2007 13:47 Go to previous message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:

A sequence is "bound" to a table only by some code in any trigger on that table.

A small correction: ...may be "bound"...

There are a lot of applications where this "bind" is done in program code (either PL/SQL or external one).

Regards
Michel
Previous Topic: selecting date interval
Next Topic: sql function
Goto Forum:
  


Current Time: Mon Feb 10 11:47:23 CST 2025