adspace


Write a query to delete duplicate records in SQL SERVER

Answer Posted / vijay

WITH INTER_TABLE(ROW, COL1) AS(
select row_number() over (partition by
COL1 order by COL1) as ROW ,COL1 from [TABLE_NAME]
)
Delete from INTER_TABLE where ROW > 1

Is This Answer Correct ?    22 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we do dml on views?

1041


What is the difference between for xml raw and for xml auto?

1125


What is acid mean in sql server?

1257


How can you append an identity column to a temporary table?

1076


How do I start sql server 2017?

1023


What is sql or structured query language?

1232


What is a scheduled job or what is a scheduled task?

1043


What is normalization and what are the advantages of it?

1065


What is a view in sql?

1046


what is the Ticketing tool used in Wipro technologies at Bangalore...???

8237


What is the primary use of the model database?

1156


How raid can influence database performance?

1127


Can we shrink data file in sql server?

1135


what is the difference between openrowset and openquery?

1207


If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?

1051