Reputation: 630
I try to delete data from room database using INNER JOIN.
My code does not build. Below is the error.
How to delete data using INNER JOIN?
Upvotes: 3
Views: 1128
Reputation: 884
What about following query :
DELETE FROM waybills WHERE status IN (SELECT type FROM timestamps WHERE timestamp = 23)
Upvotes: 1
Reputation: 3261
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)
Upvotes: 3