title: How to find out if a certain value exists as a primary key in mySql?
body: <p>What is the best way to find out if a primary key with a certain value already exists in a table?</p>
  
  <p>I can think of:</p>
  
  <pre><code>SELECT key FROM table WHERE key = 'value';
  </code></pre>
  
  <p>and count the results, or:</p>
  
  <pre><code>SELECT SQL_CALC_FOUND_ROWS key FROM table WHERE key = 'value' LIMIT 1;
  SELECT FOUND_ROWS();
  </code></pre>