Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Can we use ORDER BY in view?
dd wrote:
> Can we use ORDER BY clause in view's definition:
>
> CREATE OR REPLACE VIEW a_v as
> select * from a order by 1;
>
> According to Oracle's Student Guide, this is not allowed. But, by my
> testing with 9iR2, it is allowed. So what is the exact rule?
The Student Guide has many many errors. That is one of many reasons why it is of limited if not negative value.
Another error is the claim that:
SELECT deptno, avg(sal), job
FROM emp
GROUP BY deptno;
isn't valid: It is.
And there are at least 50 more.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Mon Feb 28 2005 - 10:42:29 CST