PRIMARY KEY definition in MySQL CREATE TABLE statement

后端 未结 5 1899
梦如初夏
梦如初夏 2021-01-30 20:36

What\'s the difference between this code:

CREATE TABLE samples (
  sampleid INT(11) NOT NULL AUTO_INCREMENT,
  sampledate DATE NOT NULL,
  location VARCHAR(25) N         


        
5条回答
  •  独厮守ぢ
    2021-01-30 21:04

    They are literally the same. Here is a quick site that shows you the different ways (3) to do it. http://www.java2s.com/Code/SQL/Key/Defineanduseprimarykey.htm

提交回复
热议问题