How to insert data to MySQL having auto incremented primary key?

后端 未结 5 792
一生所求
一生所求 2020-11-29 20:23

I\'ve created a table with a primary key and enabled AUTO_INCREMENT, how do I get MYSQL use AUTO_INCREMENT?

CREATE TABLE IF NOT EXI         


        
5条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-29 20:57

    Check out this post

    According to it

    No value was specified for the AUTO_INCREMENT column, so MySQL assigned sequence numbers automatically. You can also explicitly assign NULL or 0 to the column to generate sequence numbers.

提交回复
热议问题