Svenne Krap <[EMAIL PROTECTED]> writes:
> I thought of the possibility to do something like 

> select rownum as artistplacement, s.* from (select rownum as
> techplacement, * from ranking order by technical_points) order by
> s.artiste_points 

This is an interesting example, but I do not believe that ROWNUM could
really be used that way.  You are assuming that ROWNUM is computed after
the rows are sorted --- but in fact SQL requires the target expressions
of a SELECT to be computed before ORDER BY is applied.  What would you
expect to happen with
        SELECT rownum, * FROM table ORDER BY 1

Does anyone know what the actual semantics of Oracle's ROWNUM are?

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to