title: MySQL LIMIT on DELETE statement
body: <p>I put together a test table for a error I recently came across. It involves the use of LIMIT when attempting to delete a single record from a MySQL table.</p>
  
  <p>The error I speak of is "<strong>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1</strong>"</p>
  
  <p>The table I put together is called <em>test</em>; it has 3 columns, <em>id</em>, <em>name</em> and <em>created</em>. I populated the table with several records and then attempted to delete one. Below is the statement I used to try and accomplish this.</p>
  
  <p><code>DELETE t FROM test t WHERE t.name = 'foo' LIMIT 1</code></p>
  
  <p>Without the use of LIMIT 1, the statement executes just fine, but of course I wouldn't be using LIMIT if there wasn't a need for it.</p>
  
  <p>I'm fully aware that I can use another statement to accomplish this DELETE successfully. See below:
  <code>DELETE FROM test WHERE name = 'foo' LIMIT 1</code></p>
  
  <p>However my question is centered on why the first statement isn't working with LIMIT.</p>
  
  <p>So my question is, what I have done incorrectly with respect to the first statement to generate this error? </p>