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 / sneha s

fetch duplicate records from table:
select column_name from table_name group by column_name having count(column_name)>1;

get the second highest salary:
select distinct salary from emp order by salary desc limit 1,1;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain following error properties?

997


How to copy data from one table to another table?

984


Can you insert NULL in unique column?

1143


How to change the system date and time from SQL Plus Terminal ?

1202


what are the different types of SSRS reports?

151


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

1121


What is sql view?

1001


Write a code to select distinct records without using the DISTINCT keyword.

1105


What are relationships and mention different types of relationships in the dbms

950


What is the difference between a check constraint and a rule?

1221


Does view occupy space?

925


How to store and query spatial data?

978


What is the purpose of sql profiler in sql server?

999


Explain why variables called the most powerful component of ssis?

1071


How to delete a login name in ms sql server?

1048