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 / 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


Please Help Members By Posting Answers For Below Questions

What is JDBC Statement?

942


What are clob and blob data types in jdbc?

984


When does the result for an sql statement return null?

856


Why do you use a data source object for a connection?

969


Why do I get UnsatisfiedLinkError when I try to use my JDBC driver?

965


What is jdbc connection string?

938


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 ?

935


What is dburl?

945


What are the advantages of database connection pooling?

866


How are jdbc statements used?

888


What is createstatement method in java?

907


Explain the difference between inner and outer join ?

947


Why is odbc needed?

863


Explain creation of statement object with connection method create method with help of an example.

906


What is an odbc driver?

854