sqlite3 top的查询及limit语法介绍
时间:2020-10-02 10:21:04|栏目:|点击: 次
其实,在sqlite3中没有top的语法结构,但在sqlite3中有相关的语法能实现跟top语法相同的功能,sqlite3 sql是用limit这样的语法来实现的;
如:
select * from table where name='_安静?f' order by id limit 0,10;
这个效果就相当于select top 10 * from table where name='_安静?f';
如果还有更精确的:
select * from table where name='_安静?f' order by date desc,id limit 0,10;
如:
复制代码 代码如下:
select * from table where name='_安静?f' order by id limit 0,10;
这个效果就相当于select top 10 * from table where name='_安静?f';
如果还有更精确的:
复制代码 代码如下:
select * from table where name='_安静?f' order by date desc,id limit 0,10;
栏 目:
本文地址:http://www.codeinn.net/misctech/6061.html






