XOR in SQL Server
<p>I have to display the countries that are big by area or big by population but not both and Show name, population and area. Basically it's a XOR operation if i am not wrong.</p>
<p>A country is big if it has an area of more than 3 million sq km or it has a population of more than 250 million.</p>
<p>I have tried this</p>
<pre><code>SELECT name, population, area
FROM world
WHERE (area &gt; 30000000 | population &gt; 25000000) &amp;
      (area &lt; 30000000 &amp; population &lt; 25000000)
</code></pre>
<p>I am trying this on <a href="https://sqlzoo.net/wiki/SELECT_from_WORLD_Tutorial#One_or_the_other_.28but_not_both.29" rel="nofollow noreferrer">sqlzoo.net - SELECT_from_WORLD_Tutorial: Q.No-8</a>. Please select the SQL Engine to SQLSERVER.</p>