title: Auto increment column
body: <p>I want to make an AUTO_INCREMENT column in a database table,here is the syntax i write:</p>
  
  <pre><code>create table comments
  (
       name varchar(20),
       mail varchar(30),
       comment varchar(100),
       com_no int auto_increment
  );
  </code></pre>
  
  <p>and i get the following error:</p>
  
  <blockquote>
    <p>ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key</p>
  </blockquote>
  
  <p>then i made it as a primary key:</p>
  
  <pre><code>create table comments
  (
      name varchar(20),
      mail varchar(30),
      comment varchar(100),
      com_no int primary_key auto_increment
  );
  </code></pre>
  
  <p>and i get the following error:</p>
  
  <blockquote>
    <p>ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'primary_key auto_increment,name varchar(20),mail varchar(30),comment varchar(100' at line 1</p>
  </blockquote>
  
  <p>what is wrong???</p>