title: ERROR 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key
body: <p>I am creating a relation between tables which is necessary to auto increment two columns <code>id_quotation</code> and <code>seq_quotation</code>. The column <code>id_quotation</code>, I am referencing into another table (tb_core_process_id_quotation) where I already increment it. </p>
  
  <p>This table below (tb_core_process_customer_data) will be used by other tables to catch commons and main customers data. To make it is necessary this three validation keys: <code>cpf_cnpj</code>, <code>id_quotation</code> and <code>seq_quotation</code> that are common to entire tables in this database. </p>
  
  <p>tb_core_process_customer_data query:</p>
  
  <pre><code>CREATE TABLE tb_core_process_customer_data(
  cpf_cnpj VARCHAR(255) NOT NULL,
  id_quotation INT NOT NULL,
  seq_quotation INT NOT NULL AUTO_INCREMENT,
  name VARCHAR(255),
  dt_birth DATE,
  cd_insurance_type INT,
  PRIMARY KEY (cpf_cnpj, seq_quotation, id_quotation),
  FOREIGN KEY (cd_insurance_type) REFERENCES tb_nm_insurance_type(cd_insurance_type),
  FOREIGN KEY (id_quotation) REFERENCES tb_core_process_id_quotation(id_quotation)
  );
  </code></pre>
  
  <p>tb_core_process_id_quotation query:</p>
  
  <pre><code>CREATE TABLE tb_core_process_id_quotation(
  id_quotation INT NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (id_quotation)
  );
  </code></pre>
  
  <p>So, I am having difficult to relation this three keys and to make this validation. When I try to create tb_core_process_customer_data the follow message shows me off: </p>
  
  <p><code>ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key</code></p>