我在命令提示符下运行了 sqlite3 并运行了一些基本的 SQL 命令。
user@comp:~$ sqlite3
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> CREATE TABLE A (a int, b text, c float);
sqlite> INSERT INTO A(a,b,c) VALUES (1, '2', 3);
sqlite> SELECT b::int+2 FROM A;
除了最后一行,所有行都有效,它给出了错误:`
Error: unrecognized token: ":"`
我从这个问题 (Double colon (::) notation in SQL) 读到双冒号符号是 SQL 的类型转换。我是不是操作错了?
最佳答案
关于sql - 如何在sqlite3中输入cast,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32953639/