sql查询表中含有相同字段的数据

SELECT *

FROM DeliveryOrderDetails DOD

WHERE EXISTS(SELECT 1 FROM DeliveryOrderDetails DOD2 WHERE DOD.DeliveryOrderDetail_ID!=DOD2.DeliveryOrderDetail_ID

AND DOD.DeliveryOrder_ID = DOD2.DeliveryOrder_ID

AND DOD.SAP_Material_ID= DOD2.SAP_Material_ID

)