Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the syntax for "not equal" in SQLite?

Tags:

android

sqlite

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" });   

You should use in the comparator the non-equal operator: "type!=?" or "type<>?".


You can use <> operator

You will find here all the basic sql statements

http://www.firstsql.com/tutor2.htm