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
What are number line correlation administrators will use while working with a subquery?
How can you check the level of fragmentation on a table?
What is measure group, measure? : sql server analysis services, ssas
how do you test proper tcp/ip configuration windows machine? : Sql server database administration
What is trigger and different types of Triggers?
How to transfer data from a cursor to variables with a "fetch" statement?
What are the differences between stored procedure and the dynamic sql?
How to filter out duplications in the returning rows in ms sql server?
How exceptions can be handled in sql server programming?
How to write an inner join with the where clause in ms sql server?
Do you have any idea about the tcl commands?
What is the native system stored procedure to execute a command against all databases?
How do you start single user mode in clustered installations?
What are the dmvs? : sql server database administration
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?