how to retrieve the top 3 salaries of the table using rownum
Answer Posted / phantom coding
select * from (select rownum as rnum,t.* from emp order by
sal desc) a where rnum < 4
the alias to rownum (i.e:rnum) should be used. If rownum is
used for the constraint then the query would return the
first three rows it hits and the results could be wrong.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is record in pl sql?
How delete all data from table in sql?
Can you selectively load only those records that you need? : aql loader
When are we going to use truncate and delete?
Is sql workbench free?
What are different types of statements supported by sql?
Is sql low level language?
How many aggregate functions are available there in sql?
What is flag in sql?
How do I restart sql?
How does an execution block start and end in pl sql?
What is group function in sql?
how many ways we can we find the current date using mysql? : Sql dba
How do you use join?
What is procedure explain with example?