//多字段重复数据
SELECT
PUR_ORDER_ID,
MATERIAL_ID,
count( * )
FROM
b_purchase_order_detail
GROUP BY
PUR_ORDER_ID,
MATERIAL_ID
HAVING
count( * ) > 1;
//查询多字段重复数据
SELECT
*
FROM
b_purchase_order_detail
WHERE
( PUR_ORDER_ID, MATERIAL_ID ) IN ( SELECT PUR_ORDER_ID, MATERIAL_ID FROM b_purchase_order_detail GROUP BY PUR_ORDER_ID, MATERIAL_ID HAVING count( * ) > 1 );