[英]SQLite query: between
I am using SQLit in my Android app, I want to search in my database.我在我的 Android 应用程序中使用 SQLit,我想在我的数据库中搜索。
my query and error is this :我的查询和错误是这样的:
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
near "to": syntax error (code 1): , while compiling:
select * from informations where house_type = 'آپارتمانی' and room_count = '1' and (cost between 0 to 100000000) and (area between 0 to 1000)
anybody knows what is the problem ?有人知道是什么问题吗?
The syntax for the BETWEEN operator is test_expression BETWEEN low_expression AND high_expression
. BETWEEN 运算符的语法是test_expression BETWEEN low_expression AND high_expression
。 So change TO
in AND
.所以在AND
改为TO
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.