title: SELECT statement with operators not working
body: <p>I have these two tables and I need a query, that outputs every member that has the <strong>lvnr 050056</strong> <strong>AND NOT 050054</strong>.</p>
  
  <p>I have these two tables</p>
  
  <p><a href="https://i.stack.imgur.com/H7ENR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H7ENR.png" alt="enter image description here"></a></p>
  
  <p>I have tried it with the following query but it does not work right:</p>
  
  <pre><code>SELECT s.matrnr, s.vorname, s.nachname
  FROM student s
  INNER JOIN  teilgenommen t ON s.matrnr = t.matrnr
  WHERE (t.lvnr = 050056) AND (t.lvnr != 050054)
  </code></pre>
  
  <p>Only Martin Huber with the ID 0111111 should be shown, but I get both..</p>
  
  <p>I would be very thankful for any advie</p>