Ah indeed!
thanks!

  On 02/18/2015 12:22 PM, Clemens Ladisch wrote:
> gunnar wrote:
>> The subquery will always return one result or no result. So I only
>> have to UNION it ALL with the SELECT NULL part.
>>>> Clemens Ladisch <clemens at ladisch.de> wrote:
>>>>> ... WHERE cb_seq_num > (
>>>>>         SELECT cb_seq_num
>>>>>         FROM ordercallback
>>>>>         WHERE cb_uuid=@CBUUID
>>>>>         UNION ALL
>>>>>         SELECT NULL   -- at least one result
>>>>>         LIMIT 1)      -- at most one result
> But with the SELECT NULL, the subquery now returns one or two results.
> If you do use the UNION ALL, you also need the LIMIT.
>
>
> Regards,
> Clemens
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

Reply via email to