Re: select and update by row number
From: Reinhard Kuhn <kuhn_at_cas-ps.com>
Date: 1996/12/04
Message-ID: <583hd3$4qg_at_fred.cas-ps.com>#1/1
Date: 1996/12/04
Message-ID: <583hd3$4qg_at_fred.cas-ps.com>#1/1
In article <58050a$3a7_at_thymaster.interaccess.com>, akaplan_at_interaccess.com
says...
>Try something on the lines of:
>
>SELECT * FROM table_name
>WHERE ROWNUM=1 or ROWNUM=6205 or ROWNUM=12410
>ORDER BY ordering_column;
>
This will not work!
Since a ROWNUM is assigned only to rows that match with the where clause, a condition like "where ROWNUM=2" will _never_ be true. (Since there will be no row with rownum=1, the rownum 2 will not be reached)
greetings
-- _/_/_/ _/_/_/ _/ _/ // Reinhard Kuhn / It can be _/ _/ _/ _/ _/ // (kuhn_at_cas-ps.com) / done quickly, _/_/_/ _/_/_/ _/_/ // CAS GmbH / cheaply or well _/ _/ _/ _/ _/ // Lemberger Strasse 14 / - pick any two! _/ _/ _/_/_/ _/ _/ // 66955 Pirmasens, Germany /Received on Wed Dec 04 1996 - 00:00:00 CET