sqlite 可以允许把各种类型的数据保存到任何字段中,不用关心数据库本身字段声明的数据类型是什么
1.分页
select * from Account limit 1 offset 10
select * from Account limit 5 offset 15
- 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.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。