Delete Duplicate Records in DataBase sql server
if your Tabel has a duplicate data and you want to delete only duplicate records and want to save only single records in your table then this single line of code will help you..........
select * from tblname where tblname. %%physloc%% not in(select MAX(b.%%physloc%%) from tblname group by b.coloumnname)
Hope it helped you........
plz comments.........
select * from tblname where tblname. %%physloc%% not in(select MAX(b.%%physloc%%) from tblname group by b.coloumnname)
Hope it helped you........
plz comments.........
nice. very helpful
ReplyDelete