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 / raveendra reddy

select emp.name,emp.id,sal.salary from empDetail emp,empSal
sal where sal.salary < (select max(salary) from empSal) and
emp.id=sal.id order by desc limit 1;

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the benefits of PreparedStatement over Statement?

1002


How you restrict a user to cut and paste from the html page using java programing?

883


What are temp tables ?

980


What are the main components of JDBC ?

1062


What are four types of JDBC driver?

1138


What does executeupdate return in jdbc?

970


What are the advantages of collection pools?

1048


What are the different types of interfaces in the api component?

980


What is @entity in java?

955


What is a lock in jdbc?

950


What is com mysql jdbc driver?

920


Which database is used with java?

956


How many types of statements are there in jdbc?

923


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

1063


How does jdbc driver work?

982