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

1. How to fetch all the duplicate records from the table.

2. How to fetch the second highest salary from the table.

Answer Posted / amit kumar

(1) Query to fetch 2'nd highest salary:

Select max(sal) from emptable where sal not in (Select
max(sal) from emptable)

(2) How to fetch all the duplicate records from the table.

SELECT COUNT(*), <COLUMN_NAME> FROM EDUCATION GROUP BY
<COLUMN_NAME>

Is This Answer Correct ?    10 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me about the approaches which you used to counter the DI problems.

1324


Please illustrate physical database architecture? : SQL Server Architecture

968


What is amo? : sql server analysis services, ssas

1080


How to create a view and a stored procedure in ms sql server using "create view/procedure" statements?

986


Explain hostprotectionattribute in sql server 2005?

994


List out the differences between global and local temp tables in sql server?

1038


You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?

976


What do you mean by subquery?

1069


Can the query output be sorted by multiple columns in ms sql server?

965


What is named calculation? : sql server analysis services, ssas

960


What is a view and what are its advantages?

1095


How to drop an existing user defined function in ms sql server?

1016


What is a mixed extent?

997


What is the use of for clause?

1089


Explain about builtinadministrator?

1036