| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: How to identify a column in order by clause
"DA Morgan" <damorgan_at_x.washington.edu> wrote in message
news:41deb545$1_3_at_127.0.0.1...
> The best solution is, as always, positional notation
>
> SQL> ed
> Wrote file afiedt.buf
>
> 1 select table_name, column_name AS COLNAME
> 2 from user_tab_columns
> 3 where table_name = 'SERVERS'
> 4* ORDER BY 2
The positional notation is misborn ANSI SQL invention. Why is that
select table_name, column_name AS COLNAME
from user_tab_columns
where table_name = 'SERVERS'
ORDER BY 2
is different from
select table_name, column_name AS COLNAME
from user_tab_columns
where table_name = 'SERVERS'
ORDER BY 1+1
Received on Fri Jan 07 2005 - 10:41:51 CST
![]() |
![]() |