Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想根据下图从不同的 bomid(1 和 2)中获取重复的 partid。
我已经尝试过加入和拥有子句,但它不起作用。
期望输出
--------- partid ---------- 31
尝试这个:
SELECT partID FROM myTable GROUP BY partID HAVING COUNT(partID) > 1
看这里的小演示(虽然不同的字段名)