Android Question sqlite BETWEEN

Almora

Active Member
Licensed User
Longtime User
hi..
I want to get values in range of numbers but no results. where am i doing wrong?
thanks..

Dim cur As Cursor = Main.data.ExecQuery("SELECT * FROM day WHERE BETWEEN ID=10 AND ID=21 ")

android.database.sqlite.SQLiteException: near "BETWEEN": syntax error (code 1): , while compiling: SELECT * FROM day WHERE BETWEEN ID=10 AND ID=21
what I want here is to get values in the range of 10 and 21. Including 10 and 21.
 
Last edited:

teddybear

Well-Known Member
Licensed User
after research i found the right code.
You can specify a condition using Comparision or Logical Operators such as >, <, =, LIKE, NOT, etc, Also use where id>=10 and id <=21
 
Last edited:
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Upvote 0
Solution
Top