标签:and product ext pre str style ali count span
1 mysql查找一个表中字段相同的数据 2019-05-10 15:51:03
SELECT product_record_id FROM `t_warehouse_record` where document_id = 112 and document_type = 1 GROUP BY `product_record_id` HAVING COUNT(*) > 1
多字段
SELECT * FROM `t_warehouse_record` a WHERE 1 and a.document_id = 112 and a.document_type = 1 and a.product_record_id in (SELECT product_record_id FROM `t_warehouse_record` where document_id = 112 and document_type = 1 GROUP BY `product_record_id` HAVING COUNT(*) > 1)
标签:and product ext pre str style ali count span
原文地址:https://www.cnblogs.com/bushuwei/p/10844858.html