Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete data in Room using INNER JOIN?

I try to delete data from room database using INNER JOIN.
My code does not build. Below is the error.

enter image description here

How to delete data using INNER JOIN?

like image 560
user1854307 Avatar asked Jul 29 '26 01:07

user1854307


2 Answers

Sqlite does't accept this syntax , because it is different from SQL Server.
so the best solution is
DELETE FROM waybills wb WHERE status IN (SELECT type FROM timestamps WHERE timestamp = 23)

like image 171
Amjad Alwareh Avatar answered Jul 31 '26 14:07

Amjad Alwareh


What about following query :

DELETE FROM waybills WHERE status IN (SELECT type FROM timestamps WHERE timestamp = 23)
like image 28
Gaëtan S Avatar answered Jul 31 '26 14:07

Gaëtan S



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!