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
Difference between 2NF &3NF ?
What are the rules to use the rowguidcol property to define a globally unique identifier column?
How to get @@error and @@rowcount at the same time?
How to delete database objects with "drop" statements in ms sql server?
What are the steps you must follow to hide sql server instances?
What are database states in ms sql server?
Do you know concepts and capabilities of sql server?
What is the command dbcc checkdb used for?
What is the default server name for sql server?
How do I perform an unattended install of sql server 2000?
Can you explain various data region available in ssrs with their use?
What is the meaning of lock escalation and why/how to stop this? : sql server database administration
What are the properties of the transaction?
Why SQL Agent is used?
Is port 1433 secure?