Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Selecting Top n records
Hey all,
Just a very quick one. We are new to Oracle, we till recently used SQL
server exlcusively. We are trying to do select only the top one record for
a given recordset. Eg. Select top 1 <field> from <Table>. We use this
primarily for checking the existence of records, but do also use it for
other reasons.
We have found that we may be able to have a where clause something like "where rownum=1" which may do what I am after. From what I see this is will do the job, but I want to make sure that this is the best way before modifying the whole project.
Any feedback???
Thanks,
Ed.
Received on Tue Feb 29 2000 - 02:23:23 CST
![]() |
![]() |