title: Why use multiple columns as primary keys (composite primary key)
body: <p>This example is taken <a href="http://www.w3schools.com/sql/sql_primarykey.asp" rel="noreferrer">from w3schools</a>. </p>
  
  <pre><code>CREATE TABLE Persons
  (
      P_Id int NOT NULL,
      LastName varchar(255) NOT NULL,
      FirstName varchar(255),
      Address varchar(255),
      City varchar(255),
      CONSTRAINT pk_PersonID PRIMARY KEY (P_Id,LastName)
  )
  </code></pre>
  
  <p>My understanding is that both columns together (<code>P_Id</code> and <code>LastName</code>) represent a primary key for the table <code>Persons</code>. Is this correct?</p>
  
  <ul>
  <li>Why would someone want to use multiple columns as primary keys instead of a single column? </li>
  <li>How many columns can be used together as a primary key in a given table?</li>
  </ul>