查询表中重复字段数据的id

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/peng13123/article/details/84549250
select id_,price_ from ap_car a where open_ = 1 and exists(
select 1 from ap_car where a.price_=price_
group by price_ having count(*)>1 and min(id_)<a.id_
) order by price_ desc;
展开阅读全文

没有更多推荐了,返回首页