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...

Delete duplicate rows from a table without primary key by
using a single query
Table Employee
empname salary
A 200
B 300
A 200
C 400
D 500
D 500

Output should be

A 200
B 300
C 400
D 500

Answer Posted / jansi rani

SELECT EMPNAME,SAL FROM EMP GROUP BY EMPNAME,SAL

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to download and install sql server 2005 books online?

1115


What is a partition key?

907


How to delete a database in ms sql server?

1153


Explain how dts is used to extract, transform and consolidate data?

964


How you can get a list of all the table constraints in a database?

923


Explain the third normal form(3nf)?

910


what is isolation level at dead lock?

2107


How to create a large table with random data for index testing in ms sql server?

998


Can we create clustered index on composite key?

1001


Which table keeps information about stored procedures?

900


What is difference between joins and subqueries?

1070


what is the Ticketing tool used in Wipro technologies at Bangalore...???

8121


Write a SQL query to make a column as unique?

980


How to create an index on a view?

1010


How do you migrate data from mssql server to azure?

165