tags:

views:

290

answers:

2

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
+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