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 number line correlation administrators will use while working with a subquery?

1217


How can you check the level of fragmentation on a table?

1087


What is measure group, measure? : sql server analysis services, ssas

1071


how do you test proper tcp/ip configuration windows machine? : Sql server database administration

1116


What is trigger and different types of Triggers?

1199


How to transfer data from a cursor to variables with a "fetch" statement?

1143


What are the differences between stored procedure and the dynamic sql?

1137


How to filter out duplications in the returning rows in ms sql server?

1214


How exceptions can be handled in sql server programming?

1074


How to write an inner join with the where clause in ms sql server?

1165


Do you have any idea about the tcl commands?

1014


What is the native system stored procedure to execute a command against all databases?

1086


How do you start single user mode in clustered installations?

986


What are the dmvs? : sql server database administration

1120


How to write the storeprocedure with in the store procedure? and how can we write the store procedure with in a trigger vice versa? plz post me the exact answer?

2629