Home » SQL & PL/SQL » SQL & PL/SQL » Urgent: Deleting using joins on 2 tables
Urgent: Deleting using joins on 2 tables [message #38393] Tue, 16 April 2002 08:38 Go to next message
Rajesh K
Messages: 8
Registered: March 2002
Junior Member
Hi all,
Please help with this scenario.

I try to delete from a table T1 based on another table T2 for matching field values (f2,f3,f4 given below). But this statement is getting stuck although I have defined indexes for all the three fields on both tables. Please help, if I am missing out anything.
The statement is like this:

Delete from Table_t1 a
where exists (
select b.f1 from Table_t2 b
where b.f2 = a.f2 and
b.f3 = a.f3 and
b.f4 = a.f4)
Re: Urgent: Deleting using joins on 2 tables [message #38401 is a reply to message #38393] Tue, 16 April 2002 17:38 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
There is nothing wrong with your delete statement - there must be some lock or contention that is holding up the processing.

Have you or your DBA checked the various views regarding locks to see what is happening to your transaction?
Previous Topic: unique constraint
Next Topic: How to know the datatype?
Goto Forum:
  


Current Time: Fri Mar 29 10:34:53 CDT 2024