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

What is the difference between a stored procedure and a user defined function?

1021


What is difference between drop truncate and delete?

1095


What is a natural primary key?

1051


Please illustrate physical database architecture? : SQL Server Architecture

988


What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?

1198


Write a query for primary key constraint with identity key word?

1031


Explain iaas, paas and saas?

90


Why transaction is important?

976


What is primary key index?

980


What is blocking?

1068


What extended events?

1006


Write query to return all rows sql?

1057


How many categories of functions based their return modes?

1103


in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration

1067


What are logical/boolean operations in ms sql server?

1046