更新时间:2022-12-12 16:21:48
这将为您提供被引用的记录和有效的记录
This will give you those records which are referenced and those which are valid
SELECT *
FROM yourtable A
INNER JOIN yourtable B
ON A.reference_id = B.order_id
WHERE B.reference_type > 0;