加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

sqlite 数据库开发中一些用法

发布时间:2020-12-12 19:29:25 所属栏目:百科 来源:网络整理
导读:sqlite 可以允许把各种类型的数据保存到任何字段中,不用关心数据库本身字段声明的数据类型是什么 1. 分页 select * from Account limit 1 offset 10 select * from Account limit 5 offset 15 TRIM REPLACE 函数 /** * x'0A' represents the 'n' character

sqlite 可以允许把各种类型的数据保存到任何字段中,不用关心数据库本身字段声明的数据类型是什么

1.分页

select * from Account limit 1 offset 10

select * from Account limit 5 offset 15
  1. TRIM REPLACE 函数
/** * x'0A' represents the 'n' character in sqlite. For title and content in * the search result,we will trim 'n' and white space in order to show * more information. */
private static final String AAAAA = NoteColumns.ID + " AS " + SearchManager.SUGGEST_COLUMN_INTENT_EXTRA_DATA + ","
            + "TRIM(REPLACE(" + NoteColumns.SNIPPET + ",x'0A','')) AS "
            + SearchManager.SUGGEST_COLUMN_TEXT_1 + ",'')) AS "
            + SearchManager.SUGGEST_COLUMN_TEXT_2 + ","
            + R.drawable.search_result + " AS " + SearchManager.SUGGEST_COLUMN_ICON_1 + ","
            + "'" + Intent.ACTION_VIEW + "' AS " + SearchManager.SUGGEST_COLUMN_INTENT_ACTION + ","
            + "'" + NoteConstant.TextNote.CONTENT_TYPE + "' AS "
            + SearchManager.SUGGEST_COLUMN_INTENT_DATA;

3.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读