本文整理自网络,侵删。
其实,在sqlite3中没有top的语法结构,但在sqlite3中有相关的语法能实现跟top语法相同的功能,sqlite3 sql是用limit这样的语法来实现的;如:
代码如下:
select * from table where name='_安静ゝ' order by id limit 0,10;
这个效果就相当于select top 10 * from table where name='_安静ゝ';
如果还有更精确的:
select * from table where name='_安静ゝ' order by id limit 0,10;
这个效果就相当于select top 10 * from table where name='_安静ゝ';
如果还有更精确的:
代码如下:
select * from table where name='_安静ゝ' order by date desc,id limit 0,10;
书籍
select * from table where name='_安静ゝ' order by date desc,id limit 0,10;
标签:SQLite
相关阅读 >>
sqlserver、mysql、oracle三种数据库的优缺点总结
android开发笔记之android中数据的存储方式(一)
navicat图形化界面之navicatpremium12安装与使用教程
更多相关阅读请进入《Sqlite》频道 >>

数据库系统概念 第6版
本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。
相关推荐
评论
管理员已关闭评论功能...
- 欢迎访问木庄网络博客
- 可复制:代码框内的文字。
- 方法:Ctrl+C。