title: SQL - duplicates - query form one table
body: <p>I have a problem with query, this is only part of it but i have problem with selecting not duplicates values.</p>
  
  <pre><code>TABLE par 
  ProdID     ParID    Value
  23462       5         1
  23462       6         4
  237         5         2
  237         6         1
  178         2         1
  </code></pre>
  
  <p>When i executing this query:</p>
  
  <pre><code>SELECT 
   par.ProdID
  FROM
    par
  WHERE
    ((par.ParID= 6 AND par.Value &lt; 99) OR 
    (par.ParID= 5 AND par.Value &lt; 99)) AND 
    par.ProdID = 23462
  </code></pre>
  
  <p>I'm getting this result:</p>
  
  <pre><code>ProdID
  23462
  23462
  </code></pre>
  
  <p>When i change OR to AND i'll not get any result.
  How to change query that it will only show 1 result ? 
  Its only part of query and i cannot use DISTINCT or LIMIT.</p>
  
  <p>Thank You.</p>