select top 15 * from (select top 15 * from (select top 15 * from MenuInfo where 1=1 order by OrderIndex Asc,ID Asc) tp1 order by OrderIndex Desc,ID Desc) tp2 order by OrderIndex Asc,ID Asc
SELECT * FROM (SELECT ROWNUM AS no, id, name FROM (SELECT * FROM student ORDER BY name)) WHERE no <= 3; ``` 这里使用了两层嵌套的子查询,外层子查询用来过滤行数,内层子查询用来进行排序。 #### 二、SQL ...