LEFT JOIN/IS NULL gebruiken:
SELECT t.*
FROM TABLE_LIST t
LEFT JOIN TABLE_LOG tl ON tl.jid = t.jid
WHERE tl.jid IS NULL
Met NOT IN:
SELECT t.*
FROM TABLE_LIST t
WHERE t.jid NOT IN (SELECT tl.jid
FROM TABLE_LOG tl
GROUP BY tl.jid)
Met NOT EXISTS:
SELECT t.*
FROM TABLE_LIST t
WHERE NOT EXISTS(SELECT NULL
FROM TABLE_LOG tl
WHERE tl.jid = t.jid)
Ter info
LEFT JOIN/IS NULL en NOT IN zijn equivalent in MySQL - ze zullen hetzelfde presteren, terwijl NOT EXISTS langzamer/minder efficiënt is. Voor meer details:http://explainextended.com/2009/09/18/not-in-vs-not-exists-vs-left-join-is-null-mysql/