title: What is easier to read in EXISTS subqueries?
body: <p>It's a question of <strong>readability</strong>. There is no difference in performance.<br>
  <sub>Old versions of SQL Server were silly enough to look up meta data, but not any more.</sub>  </p>
  
  <pre><code>SELECT foo FROM bar WHERE EXISTS (SELECT * FROM baz WHERE baz.id = bar.id);
  SELECT foo FROM bar WHERE EXISTS (SELECT 1 FROM baz WHERE baz.id = bar.id);
  </code></pre>
  
  <p>I am not considering NULL or "fun variants" which don't seem intuitive to me.</p>
  
  <p><strike><code>SELECT foo FROM bar WHERE EXISTS (SELECT NULL FROM baz WHERE baz.id = bar.id);
   SELECT foo FROM bar WHERE EXISTS (SELECT 1/0 FROM baz WHERE baz.id = bar.id);</code></strike></p>
  
  <p>The question popped up in comments just now. I researched the manuals of the most popular RDBMS:</p>
  
  <ul>
  <li>MS SQL seems to favor <code>SELECT *</code> <a href="http://msdn.microsoft.com/en-us/library/ms188336.aspx" rel="noreferrer">in the manual</a>.</li>
  <li>The <a href="http://www.postgresql.org/docs/9.4/interactive/functions-subquery.html#FUNCTIONS-SUBQUERY-EXISTS" rel="noreferrer">example in the PostgreSQL 9.4 manual</a> uses <code>SELECT 1</code>.</li>
  <li>Oracle 11g has <code>SELECT *</code> in the <a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/conditions012.htm#sthref2961" rel="noreferrer">language reference</a>.</li>
  <li>MySQL 5.7 has <code>SELECT *</code> in the <a href="http://dev.mysql.com/doc/refman/5.7/en/exists-and-not-exists-subqueries.html" rel="noreferrer">reference manual</a> but also<code>SELECT 1</code> in the comments.</li>
  <li>SQLite has no example in the <a href="http://www.sqlite.org/lang_expr.html#in_op" rel="noreferrer">language reference</a>.</li>
  </ul>
  
  <p>A search on SO for <code>code:"EXISTS (SELECT 1"</code> yields 5,048 results.<br>
  A search on SO for <code>code:"EXISTS (SELECT *"</code> yields 5,154 results.<br>
  <sub>Updated links and counts 07.2015.</sub></p>
  
  <p>So <code>SELECT *</code> has the popular vote and the big commercial RDBMS on its side.<br>
  I find <code>SELECT 1</code> more intuitive. It's like saying "if at least one exists".<br>
  Is <code>SELECT *</code> more intuitive?</p>