On 11/9/2016 8:53 PM, Simon Slavin wrote:

On 9 Nov 2016, at 4:44pm, Jiri Bajer <sari...@seznam.cz> wrote:

sqlite> select CAST('1970-01-02 03:04:00.000000' AS TIMESTAMP);

SQLite has no TIMESTAMP type.  See the "CAST expressions" section near the end 
of

<https://www.sqlite.org/lang_expr.html>

So the mystery becomes that of what happens if you write "CAST (11.5 AS FRED)". 
 The documentation doesn't seem to mention this.

It is in fact documented, between https://www.sqlite.org/lang_expr.html#castexpr and https://www.sqlite.org/datatype3.html#affname . CAST(expr AS name) determines affinity from `name`, then coerces the value of `expr` according to that affinity. The default affinity, when no specific rules apply, is NUMERIC.
--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to