I've seen these two threads:
How delete table inner join with other table in Sqlite?
SQlite delete inner join
But im pretty sure this question isn't a duplicate.
So i wrote this select statement:
select * from tags
inner join pictures
on pictures.id = tags.picture_id
inner join albums
on pictures.album_id = albums.id
where tags.user_id = 1 and pictures.name = "Me and Obama" and albums.name = "Me and VIPs";
and now I need to pretty much make a delete statement out of it.
I tried replacing "select *" with "delete", but that's not correct syntax.
How would I go about doing this? This is what I have so far:
delete from tags
where picture_id in (select id from pictures where name = "Me and Moshe Dayan") and tags.user_id = 1
but it's missing the entire inner join with albums, which I have no idea how to implement.
Any help would be greatly appreciated!