共计 193 个字符,预计需要花费 1 分钟才能阅读完成。
1. sql 查找一列中呈现次数大于 8 的记录
select
`POID`
from
`orderDetail`
group by
`POID`
having count(*) >8;
2. SQL 查找汇合中的记录
select
`OID`
from
`orderHead`
where
`OID` in (
select
`POID`
from
`orderDetail`
group by
`POID`
having count(*) > 8
);
正文完