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
Which are the two editions in which SQL Azure database available?
How many types of dimensions are there and what are they? : sql server analysis services, ssas
List the ways in which dynamic sql can be executed?
What is user-defined inline table-valued function?
How many null values we can have in a unique key field in sql server?
What are the advantages of sql stored procedure?
Why do we use functions?
How to select some specific columns from a table in a query in ms sql server?
On a windows server 2003 active – passive failover cluster, how do you find the node which is active?
What is the meaning of sql server?
Explain sql server service broker?
What is the difference between char and varchar2 datatype in sql?
How can delete duplicate records in cte in sql server?
What is difference between createstatement and preparedstatement?
How to test odbc dsn connection settings?