On 27 Apr 2012 at 22:16, Simon Slavin <slavins@...> wrote:
> On 27 Apr 2012, at 9:00pm, Tim Streater <tim@...> wrote:
>> delete from addressbook where absid=(select personnick from grouplinks where
>> 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:
Yes. I confess to being a mere hacker where SQL itself is concerned. I should really have looked up the syntax for expr: