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

Find 2nd Highest salery in emp table

Select* from emp where &n=
select * count from emp where (salery >=emp.salery)


Enter n value 2


These query is correct or not. Tell me any other methods.

Answer Posted / ramu

by using sub quries we can do
select * from emp where sal=select max(sal) from emp where
sal<select max(sal) from emp;

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the server name in sql server?

959


Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?

996


When does the auto update index statistics feature in sql server turn itself on?q) what specific conditions database should meet, before you can bulk copy data into it using bcp?

935


Tell me something about security and sql azure?

114


What is exporting and importing utility?

1019


How global temporary tables are represented and its scope?

907


Can I run multiple instances of sql server 2000 at the same time on one computer?

1026


What are the differences between char and nchar in ms sql server?

1009


What is the cartesian product of the table?

902


What is default constraint?

936


What is database white box testing?

1079


What is the difference RDBMS and Graph Database?

1006


What is relationship? What number of sorts of relationship are there?

1064


Do you know what is similarity and difference between truncate and delete in sql?

961


Which are new data types introduced in sql server 2008?

990