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 is JDBC Statement?
What are clob and blob data types in jdbc?
When does the result for an sql statement return null?
Why do you use a data source object for a connection?
Why do I get UnsatisfiedLinkError when I try to use my JDBC driver?
What is jdbc connection string?
If you are given a choice to implement the code to either insert a record or update if already exist, which approach will you follow ?
What is dburl?
What are the advantages of database connection pooling?
How are jdbc statements used?
What is createstatement method in java?
Explain the difference between inner and outer join ?
Why is odbc needed?
Explain creation of statement object with connection method create method with help of an example.
What is an odbc driver?