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 / rajkumar v

Ans:1
select Column_Name from Table_Name group by Column_Name
having count(Column_Name )>1

Ans:2
salary - column name

SELECT TOP 1 salary FROM (SELECT DISTINCT TOP 2 salary FROM
Table_Name ORDER BY salary DESC) A ORDER BY salary

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a sub-report?

146


what are the critical issues you have resloved in your company

2016


What are different types of raid levels?

1238


What is the difference between dataadapter and datareader?

1061


What are distinctive joins find as a part of sql?

1005


Ways to improve the performance of a SQL Azure Database?

125


How to generate create table script on an existing table in ms sql server?

1197


How can I track the changes or identify the latest insert-update-delete from a table?

1015


What are sql dirty pages?

1082


What is serializable?

1090


What is resource db in sql server?

1058


Can you explain the disadvantages/limitation of the cursor?

1055


Explain the properties of the relational tables?

1032


What is NOT NULL Constraint in sql server 2012?

1047


Do you know what is lock escalation?

1057