|
-
[QUOTE]Originally posted by kris123
[B]Hi kuya Akila,
I tested the sample program in the scott/tiger schema.
I guess the where clause should be rownum<11;
Hai,
if u r willing to use the function Rank() then DONT use the ROWNUM in the WHERE clause , the rows shud be restricted as
select x, y, salary from ( select x, y, salary, RANK() OVER (ORDER BY SALARY DESC) SAL from EMP ) where SAL<=10;
**** note : iam using SAL in WHERE clause.
The other one with ROWNUM is the simple one, (i prefer to use ROWNUM ) i gave u the complicated one bcoz u mentioned abt using functions to do this.
Anyways, happy that u got the results.
Akila Rajakumar
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
|