sql查询按两个字段查询重复记录
sql查询按两个字段查询重复记录
日期:2019-11-17 01:13:12 人气:2
用关键字 stinct,select stinct 字段,是不重复的意思。代码的实例如下:
查询order_id和loan_lind两个字段相同的记录:
select distinct a.order_preview_id, a.order_id, a.loan_kind
from ddk_order_preview_info a
join ddk_order_preview_info b
on a.order_preview_id != b.order_preview_id
where a.order_