title: Insert unique value based on auto-incremented column
body: <p>I currently have a table with an id column that is being autoincremented and then there's a tracking_code column that has a unique constraint on it.</p>
  
  <p>Currently the tracking_code is being supplied by the person signing up, but now the client wants that tracking_code to be auto-generated yet be changeable as well.
  In other words, where a user signs up, auto-generate the tracking_code, but allow the user to update that code to anything else as long as it stays unique. </p>
  
  <p>Is it possible to do something like this in MySQL (append a string to an autoincremented id which only exists after the record is inserted) or is there another way of doing it in mysql:</p>
  
  <p>INSERT INTO mytable (..., tracking_code, ...) VALUES (..., 'foo-' + id + '-bar', ...)</p>