title: What's the difference between using INDEX vs KEY in MySQL?
body: <p>I know how to use INDEX as in the following code. And I know how to use <em>foreign key</em> and <em>primary key</em>.</p>
  
  <pre><code>CREATE TABLE tasks ( 
    task_id INT UNSIGNED NOT NULL AUTO_INCREMENT, 
    parent_id INT UNSIGNED NOT NULL DEFAULT 0, 
    task VARCHAR(100) NOT NULL, 
    date_added TIMESTAMP NOT NULL, 
    date_completed TIMESTAMP, 
    PRIMARY KEY (task_id), 
    INDEX parent (parent_id), 
    ....
  </code></pre>
  
  <p><br>
  However I found a code using KEY instead of INDEX as following.</p>
  
  <pre><code>...
  KEY order_date (order_date) 
  ...
  </code></pre>
  
  <p><br>
  I could not find any explanation on the official MySQL page. Could anyone tell me what is the differences between KEY and INDEX?</p>
  
  <p>The only difference I see is that when I use <code>KEY ...</code>,  I need to repeat the word, e.g.<br>
  <code>KEY order_date (order_date)</code>.</p>