title: Automatically generating 6 digit unique number in MySQL
body: <p>I have a table named <code>'users'</code> with the follwing columns</p>
  <ul>
  <li><p>id</p>
  </li>
  <li><p>email</p>
  </li>
  <li><p>password</p>
  </li>
  <li><p>pin</p>
  <p>I want the '<strong>pin</strong>' to be auto-filled with a unique <em>6 digit number</em> every time a new record is added. It would be of a great help if anyone could suggest a good approach for this problem.</p>
  </li>
  </ul>