Execute this query in SQL Plus.
SELECT a.table_name primary_table, b.table_name child_table
FROM user_Constraints a, user_constraints b
WHERE UPPER(a.table_name) = UPPER('&table_name')
AND a.constraint_type = 'P'
AND a.constraint_name = b.r_constraint_name
It will ask for table_name. Enter the table name that you want to
delete. The "child_table" column lists down the dependent tables that
you first need to delete.
Vikas Bhat
Senior Software Engineer,
FBSI Pvt Ltd.,
Embassy Golf Links Business Park,
Intermediate Ring Road,
Bangalore - 560071
Email - vikas.[Email address protected]
Ph:91-80-56916482
Mob:91-9845589149
Those who aspire for the light of sun; need to bear its heat.
Any comments or statements made in this email are not necessarily those
of Fidelity Business Services India Pvt. Ltd. or any of the Fidelity
Investments group companies. The information transmitted is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. If you have received this in
error, please contact the sender and delete the material from any
computer. All e-mails sent from or to Fidelity Business Services India
Pvt. Ltd. may be subject to our monitoring procedures.
-----Original Message-----
From: RABaltazar
[mailto:oracledba-ezmlmshield-x89961534.[Email address protected]
Sent: Wednesday, August 31, 2005 3:26 PM
To: LazyDBA Discussion
Subject: RE: Truncating Table related to other table
Hi to all, im new to Oracle, im trying to truncate a table, but the
database wouldn't allow since the table has other index related to other
table. I think ineed to delete those rows on the said table(s) fisrt but
HOW CAN I KNOW WHICH TABLE(s). How to find out?
Thanks,
__________________________________________________
This communication is intended solely for the use of the addressee and
authorized recipients. It may contain confidential or legally
privileged information and is subject to the conditions in
http://www.smart.com.ph/disclaimer.
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page