Sqlite &引用;不是";主动android中的子句?

Sqlite &引用;不是";主动android中的子句?,sqlite,select,activeandroid,Sqlite,Select,Activeandroid,有人知道如何在活动的Android Select查询中使用“NOT”子句吗 我的代码是: ArrayList<MyModel> arrayList = new Select().from(MyModel.class).where("userId NOT","1").execute(); ArrayList ArrayList=new Select().from(MyModel.class).where(“userId NOT”,“1”).execute(); 这个不起作用。我如何

有人知道如何在活动的Android Select查询中使用“NOT”子句吗

我的代码是:

ArrayList<MyModel> arrayList = new Select().from(MyModel.class).where("userId NOT","1").execute();
ArrayList ArrayList=new Select().from(MyModel.class).where(“userId NOT”,“1”).execute();

这个不起作用。我如何在这里实现not子句?这里userId是我的列名。我想获得除userId 1之外的值列表。

只需使用SQL语法即可

ArrayList<MyModel> arrayList = new Select().from(MyModel.class).where("userId <> 1").execute();
ArrayList ArrayList=new Select().from(MyModel.class).where(“userId 1”).execute();
或者,如果要从变量(如x)中获取值1

ArrayList<MyModel> arrayList = new Select().from(MyModel.class).where("userId <> ?", x).execute();
ArrayList ArrayList=new Select().from(MyModel.class).where(“userId?”,x).execute();
@AjayJayendran
是sql中的“不相等”运算符,是与
等价的sql=在Java中。