On Wed, May 16, 2018 at 6:12 PM Clemens Ladisch <clem...@ladisch.de> wrote:

> Stephen Chrzanowski wrote:
> > On Wed, May 16, 2018 at 6:25 AM, Clemens Ladisch <clem...@ladisch.de>
> wrote:
> >> SELECT action FROM blocked WHERE email = ?
> >> UNION ALL
> >> SELECT 'OK'
> >> LIMIT 1;
> >
> > Out of curiosity, where's the guarantee that the OK won't be displayed if
> > an email is found?
>
> The "LIMIT 1" makes the DB stop after the first returned row.
> It applies to the entire compound query, not only to the second SELECT.
>

But does SQL guarantee the first result-set (above the UNION ALL)
must be before the second one (below UNION ALL)? --DD
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to