title: SQL Incorrect table definition; there can be only one auto column and it must be defined as a key
body: <p>If i run the SQL command below i always get this error: </p>
  
  <blockquote>
    <p>Invalid SQL: CREATE TABLE ms_account (accountid INT NOT NULL auto_increment,accountname VARCHAR(50) NOT NULL,kindofaccount SMALLINT NOT NULL,accountowner VARCHAR(20) NOT NULL,accountcurrency VARCHAR(10) NOT NULL,accountbalance DECIMAL(15,2) NOT NULL,bankid VARCHAR(8) NOT NULL,createdate INT NOT NULL,deletedate INT NOT NULL,changedate INT NOT NULL,deleted SMALLINT NOT NULL,locked SMALLINT NOT NULL,PRIMARY KEY accountid (bankid,accountid)) ; : Incorrect table definition; there can be only one auto column and it must be defined as a key</p>
  </blockquote>
  
  <p>SQL</p>
  
  <pre><code>"CREATE TABLE {$utcv_db_prefix}account (".
  "accountid INT NOT NULL auto_increment,".
  "accountname VARCHAR(50) NOT NULL,".
  "kindofaccount SMALLINT NOT NULL,".
  "accountowner VARCHAR(20) NOT NULL,".
  "accountcurrency VARCHAR(10) NOT NULL,".
  "accountbalance DECIMAL(15,2) NOT NULL,".
  "bankid VARCHAR(8) NOT NULL,".
  "createdate INT NOT NULL,".
  "deletedate INT NOT NULL,".
  "changedate INT NOT NULL,".
  "deleted SMALLINT NOT NULL,".
  "locked SMALLINT NOT NULL,".
  "PRIMARY KEY (bankid,accountid)".
  ") $utcv_db_create_extension;";
  </code></pre>
  
  <p>i already tried to add primary key to <code>"accountid INT NOT NULL auto_increment,".</code> but that only returns the error multiple primary keys</p>