Re: How can I limit the NUMBER of rows returned?

From: John Gillespie <jgg_at_waldo.corte-madera.geoquest.slb.com>
Date: 30 Jan 1995 17:37:01 GMT
Message-ID: <3gj83t$ia3_at_k2.San-Jose.ate.slb.com>


Try adding the following to the WHERE clause:

WHERE ROWNUM <= 100;

There is (was) a problem with this:
The SQL statement still needs to be processed to completion(e.g. sorted, grouped and otherwise manipulated) and only the first 100 rows are printed.

Note also that ROWNUM is a very late binding row: Don't try ROWNUM BETWEEN 200 AND 300, since ROWNUM is assigned just as the row is passing all other criterion. If no row is emitted, then there will never be a row 1... Received on Mon Jan 30 1995 - 18:37:01 CET

Original text of this message