suppose we have a table in which 200 rows. i want to find
101 row ? what the query....
and how we find 4th and 5th highest salary and 1 to 10
highest salary
Answer Posted / meher
Let the table name is EMP
To find 101st row the query is as below:
select * from EMP where rownum <= 101
minus
select * from EMP where rownum <= 100;
for Nth salary the query is as below:
SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT
(DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal);
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is cursor status?
Can variables be used in sql statements?
Can we edit a view in sql?
How to create an array in pl/sql?
What is a system versioned table?
What is lookup table in sql?
What is group by in sql?
What are actual parameters and formal parameters?
How do you create an update query?
Can we enter data in a table in design view?
How to pipe multiline string to isql?
What is the difference between the conventional and direct path loader? : aql loader
What is data modelling in sql?
what is the difference between a local and a global temporary table? : Sql dba
What is the file extension for sql database?