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

Why would you use setautocommit(false) in jdbc?

656


Why do we use jdbc statements?

507


What are the advantages of database connection pooling?

488


What are the factors that the jdbc driver performance depends upon?

520


What is “dirty read” in JDBC? Which isolation level prevents dirty read?

593






What is the limitation of PreparedStatement and how to overcome it?

636


What is the meaning of batch updates?

558


What is sqlwarning?

551


How to insert and delete a row programmatically? (new feature in JDBC 2.0)

531


How can we disable a constraint ?

560


Is jdbc database independent?

493


What are drivers available?

616


How can we store and retrieve images from the database?

513


What are collection pools?

518


Explain about the drive manager class working?

602