ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Databases  >>  SQL PLSQL
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
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
 Question Submitted By :: Sharad Singh
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
Let Table name : Employee
Let the columns: Employee_name, Salary

To find 101st row:

select * from (select * from Employee order by
emplayee_name) where rownum = 101

To find 4th highest salary

select * from (select * from Employee order by salary desc)
where rownum = 4


To find 5th highest salary

select * from (select * from Employee order by salary desc)
where rownum = 4


To find 1 to 10 highest salary

select * from (select * from Employee order by salary desc)
where rownum < 11
 
Is This Answer Correct ?    5 Yes 2 No
Basavaraj Yadwad
 
  Re: 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
# 2
select * from emp where (rowid,0) in 
(select rowid,mod(rownum,101) from emp)
and rownum=1
 
Is This Answer Correct ?    0 Yes 0 No
Hemant
 
 
 

 
 
 
Other SQL PLSQL Interview Questions
 
  Question Asked @ Answers
 
Find out the 3rd highest salary? BirlaSoft23
What is an Integrity Constraint?  4
what is difference between "Primary key" and "Unique key"? PreVator4
how to find the second highest salary from emp table? Wipro40
What is difference between a PROCEDURE & FUNCTION ? Satyam5
How to convert ms-excel file to oracle table?  2
how to retrieve the top 3 salaries of the table using rownum Oracle17
type type_name is table of varchar2(30) index by binary_integer for the above type you have to create a identifier... like identifier_name type_name; for the above type you can use the below methods..like first , last , prior, next , delege..etc...like this.. if you create a cursor...like cursor cursor_name is select * from scott.emp; is there any methods like above to use prior, fist , last , next , trim ,etc... Satyam1
what is purge command explain about oracle performance tuning Accenture2
How would you hide a table in sql. ie the table can be only visible to its maker?  2
1 SELECT a.field1, b.field2, c.field3, d.field4 2 FROM atable a, atable b, ctable c, dtable d 3 ? 4 ORDER BY 1 What is the minimum number of joins that must be specified on line 3 in the sample code above to properly link the tables? Notice that the table "atable" is aliased twice: once as "a" and once as "b." 1. One join 2. Two joins 3. Three joins 4. Four joins 5. Five joins Sonata5
Difference between a query and strored procedure? Microsoft3
what is autonomouse transaction? Oracle3
how can i read files from a pl/sq l program  3
Can any one tell me how to increase the performance of a sql query ie what are the performance tips in creating or writing a sql query !!? eBay3
What are different types of joins ? BirlaSoft4
What is the difference between anonymous block and named blocks?  2
How many LONG columns are allowed in a table?  3
what is meant by forward declaration in functions?  3
there are 2 variables called x and y ,x contains 1,2 and y contains 3,4 we have to swap the values from x to y and y to x with out using dummy variables and it can be done only by using a single statement ? how? Oracle8
 
For more SQL PLSQL Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com