On 27 Apr 2012, at 9:00pm, Tim Streater <t...@clothears.org.uk> wrote:
> > delete from addressbook where absid=(select personnick from grouplinks where > groupnick='27') > > The 'select personnick ...' can return zero, one, or many results, and I'd > like to have the 'delete from ...' delete zero, one, or many rows from the > addressbook table. How can I do that with a single statement in SQLite, or is > it not possible? The sub-SELECT evaluates to a list, not an individual number. And 'absid' will never equal a list. You probably mean DELETE FROM addressbook WHERE absid IN (SELECT personnick FROM grouplinks WHERE groupnick = '27') or something like that. The syntax tree for DELETE can be found here: <http://www.sqlite.org/lang_delete.html> Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users