At 23:36 18/03/2018, you wrote:
In other words, aliases in the SELECT clause are evaluated _after_ the
FROM and WHERE clauses are done.
The order of the SELECT/WHERE clauses in the SQL syntax is misleading;
the actual behaviour would be better represented by something like this:
( FROM test
WHERE name = 'foo!' )
SELECT test.name || '!' AS name;
I must be misinterpreting:
create temp table t (a int);
insert into t values (1), (2), (6);
select a int, printf('<%5i>', a) fmt from t where fmt like '%>';
int fmt
1 < 1>
2 < 2>
6 < 6>
Here WHERE understands what fmt refers to.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users