9i下: SQL> select * from (select * from student order by sbirthday desc) as stu where rownum<6; select * from (select * from student order by sbirthday desc) as stu where rownum<6 * ERROR 位于第 1 行: ORA-00933: SQL 命令未正确结束 ???
this is a limitation of Oracle 8.0.x, which doesn't support sorting in subqueries. Only versions 8.1.x are able to do so.
this is a limitation of Oracle 8.0.x, which doesn't support sorting in subqueries. Only versions 8.1.x are able to do so.
不要as就行了,试一下: select * from (select * from student order by birthday desc) stu where rownum<6;
select a.* from (select b.* from table1 b order by rq desc) as a where a.rownum<6;
不用别名应该也没错的。我怀疑可能是 版本的限制。没用过804,不知道能不能用子查询。
SQL> select * from (select * from student order by sbirthday desc) as stu where rownum<6;
select * from (select * from student order by sbirthday desc) as stu where rownum<6
*
ERROR 位于第 1 行:
ORA-00933: SQL 命令未正确结束
???
select * from (select * from student order by birthday desc) stu where rownum<6;
根据 l2g32003(T2-X) 所说,这是8.0.X版本oracle的限制,
不能在子查询里用order by的。
还有flymoon(花儿月)同学,你进行拷贝粘贴的用意何在呢??????