Select and display only duplicate records in mysql

后端 未结 12 2147
南旧
南旧 2020-12-08 06:56

This question is pretty simple I for some reason cant get the proper result to display only the duplicate records

Table   : Paypal_ipn_orders
id                      


        
12条回答
  •  天涯浪人
    2020-12-08 07:34

    I think this way is the simplier. The output displays the id and the payer's email where the payer's email is in more than one record at this table. The results are sorted by id.

        SELECT id, payer_email
        FROM paypal_ipn_orders
        WHERE COUNT( payer_email )>1
        SORT BY id;
    

提交回复
热议问题