
mysql 中
表(hell)的结构: fk_field_1, fk_field_2 然后想要找出
fk_field_2 = (fk_field_2_1, fk_field_2_2, fk_field_2_3) 的 fk_field_1 要怎么写 sql 谢谢
找到解法了
select * from Parents p where 3 = ( select Count(DISTINCT c.xId) from Child c where p.id = c.pid and c.xid in (4,5,6) ) 1 tairan2006 2020-01-17 08:47:20 +08:00 via Android 先 join 然后用 where 不就可以了? |
2 no1xsyzy 2020-01-17 12:47:21 +08:00 你可以把老二插电风扇里 |