sql 语句比较
两个很基础的SQL 可是我一不小心就写错了。特此记录。
SELECT * FROM `jk_usertags` ut WHERE ut.`id` NOT IN (SELECT tagid FROM `jk_tagvsuser` GROUP BY tagid)
SELECT * FROM `jk_usertags` ut ,(SELECT tagid FROM `jk_tagvsuser` GROUP BY tagid) test WHERE ut.`id` NOT IN (test.tagid)
SELECT * FROM `jk_usertags` ut ,(SELECT tagid FROM `jk_tagvsuser` GROUP BY tagid) test WHERE ut.`id` NOT IN (test.tagid)