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
What are the benefits of PreparedStatement over Statement?
How you restrict a user to cut and paste from the html page using java programing?
What are temp tables ?
What are the main components of JDBC ?
What are four types of JDBC driver?
What does executeupdate return in jdbc?
What are the advantages of collection pools?
What are the different types of interfaces in the api component?
What is @entity in java?
What is a lock in jdbc?
What is com mysql jdbc driver?
Which database is used with java?
How many types of statements are there in jdbc?
What are the differences between setmaxrows(int) and setfetchsize(int)?
How does jdbc driver work?