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 is the function of setautocommit?

658


What is db client?

508


What is @entity in java?

538


Give an example for execution of sql statement.

538


What do you mean by database connection pooling?

526






What are the different types of statements? How we can you use preparedstatement.

521


What is an advantage of using the jdbc connection pool?

464


Why do we need jdbc?

585


How to check jdbc driver version in sql server?

492


Explain the difference between resultset and rowset in jdbc

545


How does jdbc connect to database?

488


How do I stop nullpointerexception?

521


What is dburl?

595


When does the result for an sql statement return null?

521


What is jdbc oracle thin?

488