Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Given an employee table, how would you find out the second
highest salary?

Answer Posted / trived

select * from emp
where n-1 = (select count(*) from emp e
where emp.salary<e.salary)

in place of n-1 you can keep zero for first hight salary
and 1 for second hightest salary.....etc

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the rollup operator?

990


How to replace not in with not exist?

1976


How you can make a parameterized view?

951


What is the maximum length of an extended property?

922


Where is dbms used?

1009


The count() function always returns a int value type what should you do if you need to count rows from a query which you know will return a value that is too large for an int value type?

943


How can I detect whether a given connection is blocked?

979


How to use timestamp datatypes

1964


Explain what a database is?

976


You have a table with three columns: amount1, amount2, and amount3 in a single row only one of these three columns will have a value and the other two will be null. Write a sql query to retrieve the values from these columns?

915


What are the 18 schemas?

1045


What is a database development?

898


What are the three basic rules which are to be followed for the relational model of the database?

929


Explain the cube operator?

932


What is database design and development?

951