开发者

database sqlite

I want to delete a particula开发者_StackOverflow社区r row fro two tables with the help of single query..


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


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜