Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Remove duplicates records and add unique key to the column

$
0
0
I have to  delete  duplicates records  which having  same date and same ID with below conditions and then  add unique key on date and ID 

SELECT SDATE , ID , COUNT(1) AS CNT FROM  OT_DTL GROUP BY SDATE

Viewing all articles
Browse latest Browse all 3145

Trending Articles