 <p>You can do this. You can use a <code>CROSS JOIN</code> to get all entries from the software table, then do a <code>LEFT JOIN</code> to the computer_has_software table <code>WHERE</code> software_idsoftware <code>IS NULL</code> to get software that does not exist for that computer.</p> <pre><code>SELECT s.idsoftware, s.name FROM computer as c CROSS JOIN software as s LEFT JOIN computer_has_software as chs ON s.idsoftware = chs.software_idsoftware AND c.idcomputer = chs.computer_idcomputer WHERE chs.software_idsoftware IS NULL and c.name = 'komp001'; </code></pre> <p><a href="http://www.sqlfiddle.com/#!9/2914a/9" rel="nofollow" title="sqlfiddle">sqlfiddle</a></p>