Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

how to delete duplicated records in sqlserver

$
0
0

Greetings to all
Dear friends, I need to delete the records in the database table that have a specific duplicate field, but I don't know how to write the appropriate query for this operation. Please help us in this regard.

form example my table is like this : 

1    amir      6496   12

2    ali          1235    11

3    amir       4564    16

4     golo       1321    18

In this query it is necessary to show me the result of the table below

1    amir      6496   12

2    ali          1235    11

4     golo       1321    18

It doesn't matter which record is deleted, only the record with the duplicate field is deleted


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>