title: Can you have multiple Keys in SQL and why would you want that?
body: <p>Is there a reason why you would want to have multiple KEYs in a TABLE? What is the point of having multiple KEYs in one table?</p>
  
  <p>Here is an example that I found:</p>
  
  <pre><code>CREATE TABLE orders(
  id INT UNSIGNED NOT NULL AUTO INCREMENT,
  user_id INT UNSIGNED NOT NULL,
  transaction_id VARCHAR(19) NOT NULL,
  payment_status VARCHAR(15) NOT NULL,
  payment_amount DECIMAL(15) NOT NULL,
  payment_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY(id),
  KEY(user_id),
  )
  </code></pre>
  
  <p>Also, you'll notice the DBase programmer doesn't make <code>transaction_id</code> a <code>KEY</code>. Is there a reason for this?</p>