21,891
社区成员
发帖
与我相关
我的任务
分享
--ORACLE 8I 测试通过,分页可通过限制IID的范围来获得
select * from
(select rownum iid,t1.art_no,t2,buyer_uid from table1 t1,table2 t2
where t1.id=t2.fid order by t2.time desc)
where iid between 2 and 5
select b.id,b.name,a.t from((select fid,max(id),UNIX_TIMESTAMP(time) as t from table2 group by fid )a left join (select id,name from table1)b on a.fid=b.id) order by a.t desc
select b.id,b.name,a.time from((select fid,max(id),time from table2 group by fid )a left join (select id,name from table1)b on a.fid=b.id) order by b.time asc