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

how to find the second highest salary from emp table?

Answer Posted / hridayeshwar rao

select max(age) from yd where age<(select max(age) from HK) ; /// True two table Highest

SELECT * FROM HK E1 WHERE 1 =(SELECT COUNT(DISTINCT age) FROM HK E2 WHERE E1.age < E2.age); ///Second Hightest age RT single table

select age from hk e1 where (3-1) = (select count(distinct (e2.age)) from yd e2 where e2.age>e1.age);//// same True Second Hight age RT two table

select max(age) from YD where age not in (select max(age) from YD); //second hight age in single table

Suppose that salery=age

Thanks !!!

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of joins in sql?

1778


What are character functions in sql?

936


How do I save a sql query?

1008


Is pl sql and postgresql same?

1121


What are the advantages of sql? Explain

1097


Is sql scripting language?

1048


explain the difference between delete , truncate and drop commands? : Sql dba

1089


How to display the records between two range in Oracle SQL Plus?

1143


What is clustered index in sql?

1048


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2564


What are analytic functions in sql?

1022


Can we use pl sql in mysql?

1009


What is embedded sql with example?

1037


what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

1121


What is int identity in sql?

1132