How to delete all duplicate records from SQL Table?

后端 未结 4 418

Hello I have table name FriendsData that contains duplicate records as shown below

fID UserID  FriendsID       IsSpecial      CreatedBy
---         


        
4条回答
  •  隐瞒了意图╮
    2020-12-30 14:37

    Try this query,

      select * from FriendsData f1, FriendsData f2
      Where f1.fID=f2.fID and f1.UserID  =f2.UserID  and f1.FriendsID  =f2.FriendsID
    

    If it returns you the duplicate rows, then replace Select * by "Delete"

    that will solve your problem

提交回复
热议问题