我在命令提示符上运行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; 除了最后一行外,所有行都正常工作,这会导致错误:
错误:无法识别的标记:“:”
我从这个问题(SQL中的双冒号(::)符号)中读到,双冒号表示法是用于SQL的类型转换。我做错手术了吗?
发布于 2015-10-05 16:45:57
https://stackoverflow.com/questions/32953639
复制相似问题