-4
我有以下几类(多对多关系):SQL INNER JOIN不存在
+ post
post_tag
+ tag
post_category
+ category
如何创建SQL查询,以检查其标签中没有类别帖子?
谢谢!
我有以下几类(多对多关系):SQL INNER JOIN不存在
+ post
post_tag
+ tag
post_category
+ category
如何创建SQL查询,以检查其标签中没有类别帖子?
谢谢!
select distinct pt.tagname
from post_tag pt
where not exists
(
select *
from post_category pc
where pc.post_id = pt.post_id
)
你能告诉我们你的表结构吗? – Mari