Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Selecting list of foreign keys enabled on a table
here try this
/********************************************************************* * * desc_constr.sql - Describe all Relational constrants on a table * * output 80 col - desc_constr.lis
*********************************************************************/set pause off
column constraint_name format a25
column table_name format a25
column column_name format a53
spool desc_constr.lis
select acc.constraint_name || chr(9) constraint_name,
rtrim (acc.table_name) || '.' || rtrim (acc.column_name) column_name
from all_cons_columns acc, all_constraints ac, all_constraints acr
/**********************end desc_constr.sql ***********************************************/
Alexander Bisset (a-bisset_at_aberdeen-harbour.co.uk) wrote:
: I wish to truncate a table but I am getting a "ORA-02266: unique/primary
: keys in table referenced by enabled foreign keys" message.
: I understand why this is happening what I would like to know is how I can
: get a list of all foreign keys that are referencing the table I want to
: drop. I thought I had disabled all of them but there must be one eluding me.
: Thanks in advance,
--
While DSC may claim ownership of all my ideas (on or off the job),
DSC does not claim any responsibility for them. Warranty expired when you
opened this article and I will not be responsible for its contents or use.
Received on Wed Aug 05 1998 - 06:54:09 CDT
![]() |
![]() |