I need SQL query where it has col1...coln I want to remove the duplicates records by not using col1...coln in query.

```
#WITH CTE AS(
   #SELECT [col1], [col2], [col3], [col4], [col5], [col6], [col7],RN = ROW_NUMBER()OVER(PARTITION BY col1 ORDER BY col1) FROM dbo.Table1)
#DELETE FROM CTE WHERE RN > 1

```

Here col1...col7 are used but if table has 1000 columns how we can write the SQL query in such scenario to remove duplicates records.