That depends on how you define "first".
If you want 1000 rows without regard to ordering of the data, then using
WHERE ROWNUM <= 1000 will work just fine.
If you want to order the results, THEN return only the first 1000 rows,
that's a bit
more complex, and will require a suitably more complex query, or a
procedure.
Please advise.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"David NGUYEN "
<oracledba-ezmlms
hield-x93988314.x To
[Email Address Removed] "LazyDBA Discussion"
a.com> <[Email address protected]
cc
11/28/2006 07:54
AM Subject
need a query or procedure..
hello experts,
i have a table tab1(col1,col2) , i just need to get the first 1000 rows
in this table , how to write this query ou procedure.?
thanks in advance.
david..
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
Oracle LazyDBA home page