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

How to list all login names on the ms sql server?

1133


How do I get to sql server configuration manager?

1003


Tell me what is fill factor?

958


What are the database objects? : SQL Server Architecture

1037


How to optimize stored procedures in sql server?

1175


How to drop an existing schema in ms sql server?

1089


How to create a login account in ms sql server to access the database engine using "create login" statements?

1129


What is difference between Datepart() and Datename() in SqlServer?

1200


What is pessimistic concurrency?

970


Explain the disadvantages/limitation of the cursor?

951


How to perform backup for certificates in sql server? : sql server security

1082


What is difference between global temporary tables and local temporary tables?

1227


what is an index? : Sql server database administration

968


What are the different types of Indexes available in SQL Server?

997


What are the parts of a function?

929