我我用下面的语句如何在mysql中执行自动增量?
string regInset =
"INSERT INTO Fn_Registration VALUES ('" + txtFirstName.Text + "', '" + txtLastName.Text + "', " + " '" +
txtEmailId.Text + "', " + " '" + txtPassword.Text + "', " + " '" +
txtPanNumber.Text + "', " + " '" + txtAddress1.Text + "', " + " '" +
txtAddress2.Text + "', " + " '" + txtFaxNo.Text + "'," + " '" +
txtFirmName.Text + "', " + " '" + txtPhoneNumber.Text + "', " + " '" +
txtTinNumber.Text + "', " + " '"+txtFinancialYearStart.Text+"','"+
txtFinancialYearEnd.Text+"','" + txtAccountsStart.Text + "', " + " '" +
txtAccountsEnd.Text + "','" + cbbVat.Text + "', " + " '" +
cbbstates.Text + "', " + " '" + txtCity.Text +"','"+
txtCircle.Text+"','"+txtDivision.Text+ "', '" +
txtBankName.Text + "', '" + txtAccountNumber.Text + "', " + " '" +
txtIFSCCode.Text + "', " + " '" + txtBN1.Text + "', " + " '" +
txtAC1.Text + "', " + " '" + txtIFSC1.Text + "', " + " '" +
txtBN2.Text + "', " + " '" + txtAC2.Text + "', " + " '" +
txtIFSC2.Text + "', " + " '" + DateTime.Now + "')";
值插入MySQL数据库我想在一个特定的列进行自动increament说“ID”,但我想在餐桌上设置做到这一点在MySQL的向导,但而不是代码。可能吗? 我已经打勾在mysql表向导中标记了自动增加选项,但没有用。没有完成...
您必须为您的INSERT语句中的ID列提供'NULL',或者提供一列列以填充并将ID列留在列表之外。 – Barmar