Peter Otten wrote: > select * from (select alpha from demo union all select alpha from demo) order > by alpha > decltype: (null) > > select * from (select alpha from demo union all select alpha from demo) > decltype: custom > > Even taking http://sqlite.org/c3ref/column_decltype.html > """ > If this statement is a SELECT statement and the Nth column of the returned > result set of that SELECT is a table column (not an expression or subquery) > then the declared type of the table column is returned. If the Nth column of > the result set is an expression or subquery, then a NULL pointer is > returned. > """ > into account I would have expected either NULL or "custom" for both queries.
The first query uses a temporary table for sorting. The column in that temporary table does not have a declared type. The second query returns the values directly from the underlying table column, so the declared type is also from that table. Regards, Clemens _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

