-
Hi Friends,
I would like to frame a SQL Query to a specified number of Rows say 10 Only.
Thanks in Advance
Jagadish
-
Select * from temp_table where rownum < 11
Aleš
-
And the use of rownum, which is a pseudo column, won't always return the same rows. It depends on what else you are doing (sort, order, group by, having, and doing nothing to sort the data may return entirely different rows). If you don't care which 10 rows come out, then what Ao wrote will work for you.
Also, you can only do "where rownum=1" or "where rownum < some_number." For example, you can't do "where rownum=5."
-
What parameter needs to set in SQL Plus for the SQL
select * from temp_table where rownum <= 10;
query to work;
B'cos it didn't work for me
-
Hi Mgjagadish,
Please post the error message.
skid
-
When I ran query with table having 25 Columns .The Query runs for quite a long time .Also I had to use Control-c to stop it.It does display error msg.Is there any set parameter to be used for query listing to page by page.Do I need to chk for something.
Thanks & Regards
Jagadish
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|