Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Can we use ORDER BY in view?

Re: Can we use ORDER BY in view?

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Mon, 28 Feb 2005 08:42:29 -0800
Message-ID: <1109608781.538588@yasure>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US