当前位置: 代码迷 >> 综合 >> mysql 同一字段 同时满足2个条件查询
  详细解决方案

mysql 同一字段 同时满足2个条件查询

热度:97   发布时间:2024-02-11 21:56:08.0
SELECT
a.id,
a.post_id,
a.category_id,
a.list_order,
a.`status`,
a.is_show
FROM
cmf_portal_category_post AS a
INNER JOIN cmf_portal_category_post AS b ON a.post_id = b.post_id
WHERE
a.category_id =5 AND b.category_id = 10

关联查询,同一张表

  相关解决方案