locked
mySQL auto increment RRS feed

  • Question

  • User-123511764 posted

    how to insert data manually into database , auto-increment added automatically 

    the way i did is wrong? for the CustID i already set to auto increment, supposedly database will auto detect the id?

    Tuesday, January 20, 2015 10:21 AM

Answers

  • User509211905 posted

    Hi there, you need to specify the columns, something like these:

    insert into customer (CustName, CustPhone, CustEmail) values ('Michael', 1223123, 'gmail.com')

    Specify the columns excluding the field that is auto_increment.

    Hope that helps.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 20, 2015 10:40 AM