what about "playlistID=X" ? the playlist table has "playlistID", (different playlists) i only want the ones in a particular playlist
On Nov 15, 2013, at 5:36 AM, Richard Hipp <d...@sqlite.org> wrote: > On Fri, Nov 15, 2013 at 2:55 AM, David M. Cotter <d...@kjams.com> wrote: > >> i have a "song" table S that has "songID", "playlistID", and "stale" >> (boolean) as columns (among others) >> i have a "playlist" table P that has "playlistID" and "songID" as columns >> (among others) >> >> for a particular playlistID X, i want to delete all rows from P who's >> (P.playlistID == S.playlistID == X) and S.stale == true >> >> > (Composed in the mailer and untested:) > > DELETE FROM playlist > WHERE EXISTS(SELECT 1 FROM songlist > WHERE playlist.playlistID=songlist.playlistID > AND songlist.stale); > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users