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

How to connect php with different port numbers?

1147


How to connect sql server management studio express to sql server 2005 express?

1102


Issues related in upgrading SQL Server 2000 to 2005 / 2008

1941


When you use @@error and try-catch?

1094


What is the difference between left and right outer join?

1115


What are the parts of a function?

990


What are group functions in query statements in ms sql server?

1065


What is the default Port No on which SQL Server listens?

1176


Do you know what is difference between stored procedure and user defined function?

1156


How you would rewrite the sql query to return the customerid sorted numerically?

1046


What is the federation in sql azure?

97


What is data source document?

1089


What is ssl in sql server?

1134


Is sql server free?

976


Is foreign key unique?

1048