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 to set the attribute concurrency in resultset?
How many types of JDBC Drivers are present and what are they?
What is JDBC Statement?
What are different parts of a url?
Which database is used for java?
What are the steps to connect to a database in java?
How do I insert an image file (or other raw data) into a database?
Can we have foreign key reference to a non primary key column ?
What is database deadlock ? How can we avoid them?
What does executequery return in java?
How java can be connected to a database?
Why can't I invoke the ResultSet methods afterLast and beforeFirst when the method next works?
What is “dirty read” in JDBC? Which isolation level prevents dirty read?
What is CLOB and BLOB datatypes in JDBC?
What is jdbc odbc connection?