select的问题

wenyongjie 2013-04-08 10:27:19
select t.fname,t.cardno,t.iccardid,t.stime,t.etime,t.distime,t.imgpath,t.sn,t.name,t.idcard,t.enterpriseid,t.enterprise,t.vehicleoid, b.frq
from xyreportmx t
inner join xyreporthz b on t.fname=b.fname
inner join v_vehiclelaststatusposition v on t.vehicleoid=v.VEHICLEOID
where b.fname is not null and t.fname is not null
and b.mxcount=b.insertcount
and t.isdelete='0'and t.reporttype='1'and t.signature_one='已签章'
and t.idcard is not null and t.enterpriseid is not null and t.vehicleoid is not null
and t.etime<v.GPSDATETIME
and t.is_do is null and rownum<100

显示前面100条记录,我只想显示 50-70之间的记录,要怎么改rownum<100??
有人知道不?

...全文
241 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Kobayashi 2013-04-08
  • 打赏
  • 举报
回复
select * from (select t.fname,t.cardno,t.iccardid,t.stime,t.etime,t.distime,t.imgpath,t.sn,t.name,t.idcard,t.enterpriseid,t.enterprise,t.vehicleoid, b.frq,rownum hs from xyreportmx t inner join xyreporthz b on t.fname=b.fname inner join v_vehiclelaststatusposition v on t.vehicleoid=v.VEHICLEOID where b.fname is not null and t.fname is not null and b.mxcount=b.insertcount and t.isdelete='0'and t.reporttype='1'and t.signature_one='已签章' and t.idcard is not null and t.enterpriseid is not null and t.vehicleoid is not null and t.etime<v.GPSDATETIME and t.is_do is null) t where t.hs between 70 and 100

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧