On 29 Feb 2020, at 8:37am, Marco Bambini <[email protected]> wrote:
> ORDER BY (prop_tag='ios') LIMIT 1;
>
> I would like to prioritise results based on the fact that the prop_tag column
> is 'ios'.
SQLite has a conditional construction:
CASE prop_tag WHEN 'ios' THEN 0 ELSE 1 END
So do
SELECT …
ORDER BY CASE prop_tag WHEN 'ios' THEN 0 ELSE 1 END
LIMIT 1;
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users