Cursor findNormalItems = db.query("items", columns, "type=?",
new String[] { "onSale" });
I want to return the cursor that points anything that are NOT onSale, what should I change? Thanks!
From the official documentation:
The non-equals operator can be either
!=
or<>
So your code becomes:
Cursor findNormalItems = db.query("items", columns, "type != ?",
new String[] { "onSale" });
Answer:
You should use in the comparator the non-equal operator:
"type!=?"
or "type<>?"
.
Answer:
You can use <>
operator
You will find here all the basic sql
statements
Tags: androidandroid, sql, sqlite