I want to select some records from a table depending on multiple limitations like i want to get records which lies in a range < OR > how can i write such query in SQLite.....?
+1
A:
I believe that the SQL dialect understood by SQLite is fairly standard so you can write a query such as this made-up example:
SELECT name, age, type
FROM pets
WHERE age < 2 OR age > 12 AND name LIKE "Mr%" AND type IN ("cat", "dog")
teabot
2009-07-13 10:01:03
+1
A:
If you want to query a range you can use the between
operator:
select col from Table where col2 between ? and ? order by col3
As teabot notes, SQLite uses a pretty standard version of SQL and all the usual clauses are valid.
Stephen Darlington
2009-07-13 10:20:20