notes-19-05-10
Posted bushuwei
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了notes-19-05-10相关的知识,希望对你有一定的参考价值。
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)
以上是关于notes-19-05-10的主要内容,如果未能解决你的问题,请参考以下文章