in tabase table having a column in it empname field is
there which having 5 duplicate values is there i want
deleted all the duplicates i want showing only one name
only.
Answer Posted / venkat
Hope this methodology would help you better
1.Create a temp table
2.Select duplicated row's empid,empname into the temp table.
3.Create a cursor by selecting values from temp table.
4.Keep either min or max(empid) from original table and
delete the rest of the duplicated rows.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What does executeupdate return?
What is an execution plan?
Explain logical operators in sql server?
What is the difference between the 2 operating modes of database mirroring?
Explain the steps needed to create a scheduled job?
What is collation?
Scalability, Availability, Integration with internet, etc.)?
Do you know what are the differences between lost updates and uncommitted dependencies?
Explain the purpose of indexes?
What is database black box testing?
Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?
What is transaction server distributed transaction?
How to add more data to the testing table in ms sql server?
Explain DBCC?
Is it true, that there is no difference between a rule and a check constraint?