title: an efficient way to test if a table row exists
body: <p>I'm trying to find the most efficient way to determine if a table row exists.</p>
  
  <p>I have in mind 3 options:</p>
  
  <ol>
  <li><p>SELECT EXISTS(SELECT 1 FROM table1 WHERE some_condition);</p></li>
  <li><p>SELECT 1 FROM table1 WHERE some_condition LIMIT 0,1; </p></li>
  <li><p>SELECT COUNT(1) FROM table1 WHERE some_condition;</p></li>
  </ol>
  
  <p>It seems that for MySQL the first approach is more efficient: 
  <a href="https://stackoverflow.com/questions/1676551/best-way-to-test-if-a-row-exists-in-a-mysql-table">Best way to test if a row exists in a MySQL table</a></p>
  
  <p>Is it true in general for any database? </p>
  
  <p>UPDATE:</p>
  
  <p>I've added a third option.</p>
  
  <p>UPDATE2:</p>
  
  <p>Let's assume the database products are mysql, oracle and sql-server.</p>