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...

write a query to select name from one table which has
id,name and salary from another table which has id, sal
where the salary is the second maximum

Answer Posted / bln

Select emp.name, emp.id, sal.salary from empDetai emp,
empSal sal
where emp.id=
(select innnerEmp.id from
(select innerEmpSal.id, innerEmpSal.sal from empSal
order innerEmpSal.salary desc

) where rowid=2;

)
And emp.id=sal.id;

This queiry initially execute the inner query and sort
records based on the salary. second inner query returns the
id of second maximum salary.

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we store the file in the oracle database?

891


What is device controller?

979


How do we load the drivers?

934


Explain the importance of drivermanager.

1125


What is jdbc in dbms?

955


Does the JDBC-ODBC Bridge work with Microsoft J++?

2266


What does it mean to "materialize" data?

925


What are the types of statements in jdbc?

920


What are the differences between setmaxrows(int) and setfetchsize(int)?

1016


Under what circumstances, that all four drivers are used?

2367


How many types of jdbc drivers are there?

952


Does JDBC support stored procedures?

936


What are the basic exceptions in jdbc?

1024


What is jdbc driver manager?

901


Where is jdbc url mysql?

922