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
How do you test your database? : sql server database administration
What are the restrictions applicable while creating views? : SQL Server Architecture
Why we need sql server?
What is table join?
Why use “in” clause in sql server?
What is the purpose of self join?
What is a data collection table?
How to write character string constants or literals in ms sql server?
What do you understand by triggers and mention the different types of it?
What is your recommendation for a query running very slow? : sql server database administration
how can a database be repaired? : Sql server administration
when would you go for denormalization? : Sql server database administration
Explain about sql server login?
What are the tools available in market as an alternative to sql server reporting services?
What is the beast way to write CTE in SQL Server ?