title: How to insert row that contains autoincrement column
body: <p>I have a table with 4 columns:</p>
  
  <pre><code>id, user_name, symbol, company.
  </code></pre>
  
  <p>The <code>id</code> column is the primary key and it has <code>autoIncrement</code> property.</p>
  
  <p>I want to add a record to the table, I use:</p>
  
  <pre><code>try
  {
      connection.Open();
      SqlCommand cmd = new SqlCommand("INSERT INTO users_stocks VALUES(" + 
                                      "@user_name, @stock_symbol, @company)", connection);
      cmd.Parameters.AddWithValue("@user_name", user_name);
      cmd.Parameters.AddWithValue("@stock_symbol", stock_symbol);
      cmd.Parameters.AddWithValue("@company", company);
  
      int rows = cmd.ExecuteNonQuery();
      connection.Close();
      //rows number of record got inserted
  }
  catch (SqlException ex)
  {
              //Log exception
              connection.Close();
  }
  </code></pre>
  
  <p>But it gives me exception (I have 4 columns and I only specify 3 here).</p>
  
  <p>How can I add a row with the autoIncrement column to?</p>