Cursor query
2016-07-11 10:17
911 查看
public Cursor query (boolean distinct, String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
其中各种参数意思如下(如果其中某个参数不设置,可以指定为null):table:表名。相当于select语句from关键字后面的部分。如果是多表联合查询,可以用逗号将两个表名分开。
columns:要查询出来的列名。相当于select语句select关键字后面的部分。
selection:查询条件子句,相当于select语句where关键字后面的部分,在条件子句允许使用占位符“?”
selectionArgs:对应于selection语句中占位符的值,值在数组中的位置与占位符在语句中的位置必须一致,否则就会有异常。
groupBy:相当于select语句groupby关键字后面的部分
having:相当于select语句having关键字后面的部分
orderBy:相当于select语句orderby关键字后面的部分
limit:指定偏移量和获取的记录数,相当于select语句limit关键字后面的部分
相关文章推荐
- mysql 插入汉字 异常 Incorrect string value: '\xE8\xA7\x84\xE5\x88\x99' for column 'name'
- iOS之UIImageView的contentMode详解
- [LintCode] Segment Tree Build 建立线段树
- [iOS] UILabel调整行间距方法
- hdu3519Lucky Coins Sequence
- IOS build 与version,InfoDictionary version的区别
- 应用Druid监控SQL语句的执行情况(测试数据表明,Druid性能比DBCP、C3P0、Proxool、JBoss都好)
- Web自动化框架LazyUI使用手册(3)--单个xpath抓取插件详解(selenium元素抓取,有此插件,便再无所求!)
- Web自动化框架LazyUI使用手册(3)--单个xpath抓取插件详解(selenium元素抓取,有此插件,便再无所求!)
- DUKPT(derived unique key per Transaction)
- 文件和目录之stat族函数<stat | fstat | lstat | fstatat>——APUE学习笔记(2)
- UITextView的placehoder实现带并限制100字
- ansible操作远程服务器报Error: ansible requires the stdlib json or simplejson module, neither was found!
- 2016-07-11 Null value was assigned to a property of primitive type setter 问题
- Android UI设计之<十二>自定义View,实现绚丽的字体大小控制控件FontSliderBar
- 在 PC 端使用Bluemix的 Internet of Things Foundation 双向传达接收远程装置信息
- 强大的在线web编辑器UEditor
- B - Ubiquitous Religions
- 3990 G. I guess the gift is a bag! II
- 3985. I guess the gift is a bag!