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 the types of stored procedures in an sql server?
What is difference between temp table and cte?
What are subqueries in sql server? Explain its properties.
How do you size a resultset?
what is a transaction? : Sql server database administration
Define compound operators?
What is raid? : SQL Server Architecture
Define self join?
Why we need to use secondry database file? though, we can do same work using primary database file also.
What objects does the fn_my_permissions function reports on? : sql server security
How to loop through returning rows?
What is difference between group by and having?
How to find index size for each index on table?
Explain system functions or built-in functions? What are different types of system functions?
What is a non equi join?