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

How do I retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column?

1059


Describe odbc?

978


How will you perform truncation using JDBC?

1002


What is JDBC Driver interface?

1128


Which jdbc driver is the fastest driver?

1023


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

940


What are the types of jdbc drivers that exist?

1010


What is jdbc class forname?

967


What is statement and preparedstatement in java?

887


How can I manage special characters when I execute an insert query?

942


What is a java driver?

1007


What is jdbc and why is it required?

924


What happens if connection is not closed in jdbc?

977


Can I get a null resultset?

1021


Why do I have to reaccess the database for Array, Blob, and Clob data?

1071