作业帮 > 综合 > 作业

两条Oracle取第一条语句的区别

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/07/16 22:28:25
两条Oracle取第一条语句的区别
select top 1 * from table order by a
and
select * from (select * from table order by a )C
where rownum=1
语句不通,下面的应该写成
select e.* from
((select c.rownum from (select * from table order by a ) C
where c.rownum=1)) d,
table e
where d.rownum=e.rownum