博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Sqlite中使用rowid来表示行号,用于分页。
阅读量:7104 次
发布时间:2019-06-28

本文共 952 字,大约阅读时间需要 3 分钟。

在SQLite的查询结果中显示行号,可以使用select rowid as RowNumber ,* from WSCLanguage;

 
select rowid as RowNumber ,* from WSCLanguage ORDER BY CreateTime;

 

 

 

 select distinct keyword from articlecontent;

 
 /* select last_insert_rowid()  aaa   返回最后一条记录ID*/

 

select *  from (select * from articlecontent) articleTab  where aid<=500 and createdate between '2011-3-13' and '2011-3-15' order by createdate asc limit 50;

 

select * from articlecontent where keyword like 'form%';

 
select * from articlecontent tab1,ArticleCategories tab2 where tab1.categoryid=tab2.cid;

 

/*insert  articlecontent values('aaa','abcdefg','2010-01-01','abc',4);*/

 

 

select current_timestamp   ,  datetime(CURRENT_TIMESTAMP,'localtime');;
select datetime();
select date();
select time();
select datetime('2006-10-17');
select datetime('2006-10-17 00:20:00','+5 hour','-12 minute');
select datetime('now','start of year');
select strftime('%Y-%m-%d  %H:%M:%S','now');

 

select rowid as rowNumber,* from ArticleContent;/*行号*/

 

 

 

转载地址:http://kmkhl.baihongyu.com/

你可能感兴趣的文章
Set replication in Hadoop
查看>>
Linux - 进程与内存查看
查看>>
高性能爬虫——asynicio模块
查看>>
Docker容器的数据卷(data volume),数据卷容器,数据卷的备份和还原。
查看>>
win10 字体渲染优化 色彩调整
查看>>
分享基于MemoryCache(内存缓存)的缓存工具类,C# B/S 、C/S项目均可以使用!
查看>>
VC++:ActiveX Test Container
查看>>
iOS知识点汇总
查看>>
butterknife用法总结
查看>>
Win8 Metro(C#)数字图像处理--2.55OSTU法图像二值化
查看>>
ReactiveCocoa 中 RACSignal 所有变换操作底层实现分析(上)
查看>>
Service Fabric本地开发部署修改数据目录
查看>>
php面试题
查看>>
Hexo NexT 博客本地搭建指南
查看>>
快速使用CSS Grid布局,实现响应式设计
查看>>
这并不是习惯,而是忍耐力变强了
查看>>
重看计算机基础1:数据线、地址线,按字、按字节寻址。
查看>>
oracle 11g亿级复杂SQL优化一例(数量级性能提升)
查看>>
Qt Md5应用示例
查看>>
tensorflow 笔记11:tf.nn.dropout() 的使用
查看>>