query与mysql记录相关,只获取很少的记录

mw3dktmi  于 2021-06-20  发布在  Mysql
关注(0)|答案(1)|浏览(310)

我的数据库里有10条记录,我想要5条。
就像 1,2,3,4,5,6,7,8,9,10 我要你的唱片 3,4,5,6,7,8 记录是动态的,可以非常频繁地更改。

Select * 
 From file 
 Where file_status = 1 
 Order By file_date DESC 
 limit 5

这不起作用,因为这只能获取最后五条记录。。

7ivaypg9

7ivaypg91#

select * from file where file_status = 1 order by file_date DESC limit 2,6

将获取数据作为您的examp

相关问题