Connected to:
Oracle8i Enterprise Edition Release 8.1.7.3.0 - Production
With the Partitioning option
JServer Release 8.1.7.3.0 - Production
SQL> SELECT SYSDATE "newdate" FROM DUAL;
newdate
---------
12-APR-02
SQL> SELECT SYSDATE "newdate" FROM DUAL
ORDER BY newdate;
ORDER BY newdate
*
ERROR at line 2:
ORA-00904: invalid column name
SQL> SELECT SYSDATE AS newdate FROM DUAL
ORDER BY newdate;
NEWDATE
---------
12-APR-02
So, what the difference between the two different ways in which to alias a column, and why can you order by one statement and not the other?
OCP 8i, 9i DBA
Brisbane Australia