Re: ROWNUM. can anybody clarify this to me.
From: S. Kannan <skannan_at_cardinal.fs.com>
Date: 1995/08/30
Message-ID: <421tln$pq0_at_cardinal.fs.com>#1/1
Date: 1995/08/30
Message-ID: <421tln$pq0_at_cardinal.fs.com>#1/1
Singapore Airlines Ltd (engsys_at_merlion.singnet.com.sg) wrote:
: HI,
: I have some basic doubts with the usage of ROWNUM.
: I generally used to append a condition
: WHERE rownum = 1
: for the SQL statements that check for the existence of a record.
: Does this stmt get all the records that satisfy the condition before
: rownum = 1 and then use this condition or
: the first instance itself it gets only one record ?
: Thanks for clarifying this to me.
: laxmi.
Hi Laxmi,
A Rownum = 1 condition will scan all rows and then return the first row. Rownums are assigned only at row retrieval. (And before the rows are ordered)
Hope this answers your question.
-- --------------------------------------------------------------------------- Kannan Email: skannan_at_fs.com Mastech Systems Corporation The above are my own comments and opinion. They do not purport that of anybody else. ---------------------------------------------------------------------------Received on Wed Aug 30 1995 - 00:00:00 CEST