I am looking for a dynamic script which can be helpful to remove duplicate rows (based on all columns of table) from all tables of my database.
My database contains more then 100 tables. No relations defined. No identity columns exists.
In other words I just want following script for all tables.
(SELECT *,ROW_NUMBER() OVER (PARTITION BY col1, col2, col3.....coln ORDER BY col1) DupRow
DELETE FROM CTE WHERE DupRow >1