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
Why would you use setautocommit(false) in jdbc?
Why do we use jdbc statements?
What are the advantages of database connection pooling?
What are the factors that the jdbc driver performance depends upon?
What is “dirty read” in JDBC? Which isolation level prevents dirty read?
What is the limitation of PreparedStatement and how to overcome it?
What is the meaning of batch updates?
What is sqlwarning?
How to insert and delete a row programmatically? (new feature in JDBC 2.0)
How can we disable a constraint ?
Is jdbc database independent?
What are drivers available?
How can we store and retrieve images from the database?
What are collection pools?
Explain about the drive manager class working?