I have a table EMP in which the values will be like this
EmpId Ename Sal DeptId
11 Ram 10000 10
11 Ram 10000 10
22 Raj 20000 20
22 Raj 20000 20
33 Anil 15000 30
33 Anil 15000 30
I want to delete only duplicate Rows. After Delete I want
the output like this
EmpId Ename Sal DeptId
11 Ram 10000 10
22 Raj 20000 20
33 Anil 15000 30
Answer Posted / ashim kumar pal
SET rowcount 3
delete distinct * from table
set rowcount 0
select * from table
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
What are the acid properties?
What are the extra roles available in msdb? : sql server security
Explain alternate key, candidate key and composite key in sql server?
What are the different types of upgrades that can be performed in sql server?
Is the order of columns in the set clause important in ms sql server?
What is public role in sql server?
What is a recursive stored procedure in sql server?
List out what other servers you can use with ssrs?
How to verify a login name with sqlcmd tool?
What does the not null constraint do?
What are the three different part of rdl file explain them?
What are the types of subquery?
what are candidate key, alternate key and composite key? : Sql server database administration
Will the writetext statement activate a trigger?
In what version of sql server were synonyms released?