Mysql Innodb: Autoincrement non-Primary Key

后端 未结 3 906
栀梦
栀梦 2020-11-30 09:20

Is it possible to auto-increment a non-Primary Key?

Table \"book_comments\"

book_id     medium_int
timestamp   medium_int
user_id     medium_int
vote         


        
3条回答
  •  遥遥无期
    2020-11-30 10:25

    As of MySQL 5.5, it seems to be possible without an index or primary key an INT field to be provided with autoincrement.

提交回复
热议问题