Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORDER BY in VIEW or SUBQUERY
The ORDER by claluse cannot be used in a subquery. See Oracle 7 Server
SQL Reference.
Views can not have order by clause in the CREATE VIEW command.
Why not use the ORDER by clause on the select statement which refers to the view. For example ..
Table Tab1 has a single column called Dummy with the following rows..
1
2
3
X
Create view called vTab1 using command 'create view vTab1 as select Dummy from Tab1;'
Now use the select command 'select * from vTab1 order by Dummy;'
Blinoff Dmitry wrote:
> Hello all!
>
> Does anybody know the way of using Order by clause in view
> or subquery ?
>
> --
> Dmitry, dbprok_at_ropnet.ru
--
All views expressed are mine and not that of my employers
Charanjeet Jutley
Consultant
Tel : +44 (0)1689 894457
E-Mail: charan.j_at_midas-it.co.uk
Received on Thu Apr 09 1998 - 08:59:25 CDT
![]() |
![]() |