How to retrieve duplicate rows in a table?
How to delete the duplicate entries in a table?
Answer Posted / nagabhushan adhikari
These are duplicates....
select distinct(col1),col2,col3.... into #temp from table
group by col1 having count(1) > 1
by the below delete duplicates
delete table from table A, #temp B where A.col1= B.col1
by this insert only a single record
insert into table select col1, col2,col3... from #temp
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
After creating the cube, if we added a new column to the oltp table then how you add this new attribute to the cube? : sql server analysis services, ssas
What is 4nf in normalization form?
What are different type of Collation Sensitivity?
explain different types of cursors? : Sql server database administration
What happens if null values are involved in string operations?
What is scan table/view and seek table/view when its occurs? : sql server database administration
 Explain what is sql override for a source taLle in a mapping?
What is the filtered index?
List types of tables in SQL Azure?
Different types of keys in SQL?
How to Check if table exists in sql server?
Explain the use of containers in ssis and also their types?
How to replace the Query Result 'Null Value' with a text ?
How to select some specific rows from a table in ms sql server?
Differentiate between a local and a global temporary table?