tags:

views:

23

answers:

2

I want to delete a particular row fro two tables with the help of single query..

A: 

You can't work on multiple tables at the same time. You'll need to use two queries to do that:

DELETE FROM table1 WHERE id=124125
DELETE FROM table2 WHERE id=124125
poke
A: 

That's what transactions are for:

begin transaction
// Do as many operations as you need to.
delete from TBLA where IDNUM = 7
delete from TBLB where IDNUM = 14
commit transaction

The A in ACID means atomicity, in short a guarantee that a transaction is either wholly done or not done at all. It is never partly done (with the exceptions of within the transaction itself and certain isolation levels, neither which you should concern yourself with yet).

paxdiablo