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.
如何根据以下结构检查标签是否至少使用过一次。
EXISTS半联接很可能是此任务的几种可能查询样式中最快的:
EXISTS
SELECT t.* FROM taggit_tag t WHERE EXISTS ( SELECT 1 FROM taggit_taggeditem ti WHERE ti.tag_id = t.tag_id );