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 / nagendra kumar m r
select top 1 e.[id],e.[name],s.salary from emp e join
emp_sal s on e.[id] = s.[id] and e.[id] in (select top 2
[id] from emp_sal order by salary desc)
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How do I retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column?
Describe odbc?
How will you perform truncation using JDBC?
What is JDBC Driver interface?
Which jdbc driver is the fastest driver?
What class.forname will do while loading drivers of jdbc?
What are the types of jdbc drivers that exist?
What is jdbc class forname?
What is statement and preparedstatement in java?
How can I manage special characters when I execute an insert query?
What is a java driver?
What is jdbc and why is it required?
What happens if connection is not closed in jdbc?
Can I get a null resultset?
Why do I have to reaccess the database for Array, Blob, and Clob data?