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

If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?

1025


What is wide table?

1017


Can you leave a union at any time?

1109


How do you delete a data source?

1052


What is rolap and its advantage? : sql server analysis services, ssas

1333


what is the system function to get current user's user id? : Sql server database administration

1050


What is difference between inner join and full join?

1115


What are the diifferences between the ms sql server vs mysql?

1240


Explain Capacity planning to create a database? and how to monitor it?

4245


How to find tables without indexes?

1155


Explain the categories of stored procedure i.e. System stored procedure, local stored procedure, temporary stored procedure, extended stored procedure, remote stored procedure?

1124


What samples and sample databases are provided by microsoft?

1089


Explain indexes disadvantages?

1145


How to stop a loop early with break statements in ms sql server?

1077


Can you explain what is the use of custom fields in report?

1101