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 / v.krishnakumar

using the keyword distinct we can avoid the duplicate value
in our table,(ex) SELECT DISTINCT empname FROM Employee

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of stored procedures in an sql server?

934


What is difference between temp table and cte?

960


What are subqueries in sql server? Explain its properties.

965


How do you size a resultset?

876


what is a transaction? : Sql server database administration

934


Define compound operators?

862


What is raid? : SQL Server Architecture

1101


Define self join?

987


Why we need to use secondry database file? though, we can do same work using primary database file also.

6752


What objects does the fn_my_permissions function reports on? : sql server security

991


How to loop through returning rows?

972


What is difference between group by and having?

908


How to find index size for each index on table?

960


Explain system functions or built-in functions? What are different types of system functions?

915


What is a non equi join?

913