Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why do we need a jdbcrowset like wrapper around resultset?

1187


Which is better odbc or jdbc?

918


What isolation level is used by the DBMS when inserting, updating and selecting rows from a database?

918


What class.forname will do while loading drivers of jdbc?

876


What is batch processing and how to perform batch processing in jdbc?

872


What is the limitation of PreparedStatement and how to overcome it?

1086


What is jdbc resultsetmetadata interface?

912


Is jdbc a web technology?

844


What are the different types of statements in jdbc?

870


What are different types of ResultSet?

993


What are JDBC Best Practices?

1043


Does jdbc use odbc?

937


What are the differences between statement and preparedstatement interface?

926


What is the use of JDBC DriverManager class?

1002


What is JDBC PreparedStatement?

898