How To delete duplicate record from a particular table?
Answer Posted / anil sharma
In sqlserver 2000 we must use a unique id per row then we
can delete duplicate rows.
delete from <tablename> where <rowid> not in (select min
(<rowid> from <tablename> group by co1,col2.)
But in sqlserver 2005 there a function RowId.Which is same
as above concept.It return unique id per row.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
How to use go command in "sqlcmd"?
What is transaction server distributed transaction?
Is it possible for a stored procedure to call itself or recursive stored procedure?
How to get a list of columns using the "sys.columns" view in ms sql server?
Which are the two editions in which SQL Azure database available?
Explain “not null constraint” in sql server?
How do I edit a procedure in sql server?
What is the difference between migration and upgradation in sql server?
What is data block and how to define data block size?
Can group functions be used in the order by clause in ms sql server?
What is an index in sql?
What are key, name and value columns of an attribute? : sql server analysis services, ssas
Explain how does the report manager work in ssrs?
How do you use a subquery to find records that exist in one table and do not exist in another?
Explain log shipping and mention its advantages.