• what is duplicate value delete except one value in mysql query?

    Answered

    what is duplicate value delete except one value in mysql query?

    Silver Member Asked on August 2, 2018 in MYSQL.
    Add Comment
  • 1 Answer(s)
    Best answer

     

    Example1:-
    DELETE from user as n1 inner join user as n2 on n1.name= n2.name where n1.id>n2.id
    Example2:-
    DELETE n1 FROM user n1, user n2 WHERE n1.id < n2.id AND n1.name = n2.name
    

     

    Silver Member Answered on August 2, 2018.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.