1
chairo 2013-01-15 16:36:26 +08:00 2
MSSQL版本:SELECT TOP 5 * FROM table ORDER BY id, weight
MySQL版本:SELECT * FROM table ORDER BY id, weight LIMIT 5 |
3
aisk 2013-01-15 18:44:24 +08:00
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 2013-02-08 23:08:30 +08:00
select * from (select * from tb order by id limit 20) t1 order by weight limit 5;
|