在SQLite和Android中选择Query [英] Select Query in SQLite and Android
本文介绍了在SQLite和Android中选择Query的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想写一个这样的查询:
Hi All,
I want to write a query like this:
SELECT Name from DEPT where number == number and Name == Name
我在SQLite中写了类似的查询,但这不起作用:
I wrote a similar query in SQLite but this does not work:
Cursor c=db.query(viewDepts, columns, deptnumber + deptName+"=?", new String[]{number, Time}, null, null, null);
尽快需要帮助。
谢谢,
杰森
Need Help ASAP.
Thanks,
Jason
推荐答案
看一下 query [ ^ ]和 rawQuery [ ^ ]文档。将列出查询
方法和参数详细信息。您也可以使用rawQuery
方法,您可以使用选择参数将sql语句传递给它。
Take a look at the query [^] and rawQuery [^] documentation. Thequery
methods and the parameter details are listed. You can alternatively also use therawQuery
method, you can pass the sql statement to it with the selection arguments.
查看以下内容链接.....
http://mindstick.com/Articles/2643e627-4f5c-45cc-b166-9a9b4c9ff3b1/?Select%20query%20in%20Android%20Application
它将有助于更多地了解'在Android应用程序中选择查询'或android sqlite数据库。
谢谢大家!!
Check out the following link.....
http://mindstick.com/Articles/2643e627-4f5c-45cc-b166-9a9b4c9ff3b1/?Select%20query%20in%20Android%20Application
It will help more to understand about 'select query in android application' or android sqlite database.
Thanks Everyone!!
查看以下链接。这将有助于您更好地了解sqlite select和其他数据库操作。
sqlite数据库操作 [ ^ ]
check the below link. that will help you to get a better idea about sqlite select and other database operations.
sqlite database operations[^]
这篇关于在SQLite和Android中选择Query的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文