title: How to create concatened primary key?
body: <p>Hello I'm new to MySQL but I would like to create a unique ID based on two primary keys created in two other tables.</p>
  
  <p>Here is just the part that interests us:</p>
  
  <pre><code>CREATE TABLE patient(
  id_patient int NOT NULL AUTO_INCREMENT,
  ...,
  PRIMARY KEY (id_patient))
  
  CREATE TABLE surgeon(
  id_surgeonint NOT NULL AUTO_INCREMENT,
  ...,
  PRIMARY KEY (id_surgeon))
  
  CREATE TABLE  case(
  id_patient int NOT NULL,
  id_surgeon int NOT NULL,
  CONSTRAINT FK_case_patient FOREIGN KEY (id_patient) REFERENCES patient(id_patient),
  CONSTRAINT FK_case_surgeon FOREIGN KEY (id_surgeon) REFERENCES surgeon(id_surgeon),
  CONSTRAINT id_case PRIMARY KEY (id_patient, `_`,id_surgeon));
  </code></pre>
  
  <p>I think i don't get the trick. I wanted the following result :</p>
  
  <pre><code>SELECT * FROM case;
  
  id_case  | id_patient | id_surgeon    
  32_56    |     32     |     56
  18_66    |     18     |     66
  </code></pre>
  
  <p>I know that the speed of calculation will not be optimal but this <i>id-case</i> is really necessary and <b>must</b> be visible during the select</p>