1
chairo Jan 15, 2013 MSSQL版本:SELECT TOP 5 * FROM table ORDER BY id, weight
MySQL版本:SELECT * FROM table ORDER BY id, weight LIMIT 5 |
3
aisk Jan 15, 2013
select * from xxx where id in (select id from xxx order by id limit 20) order by weight order by weight limit 1 offset 5;
|
4
Air_Mu OP 我想了下难道需要先查出行数 x 然后where id>(x-20) order by weight?
|
5
napoleonu Feb 8, 2013
select * from (select * from tb order by id limit 20) t1 order by weight limit 5;
|