Why NOT NULL add to primary key field?(primary key is already not null+unique)
Example for NOT NULL id field:
create table student
(
id int(11) AUTO_INCREMENT NOT NULL,
name varchar(255),
PRIMARY KEY(id)
)
Instead Just:
create table student
(
id int(11) AUTO_INCREMENT,
name varchar(255),
PRIMARY KEY(id)
)
Edit: I add AUTO_INCREMENT.
Thansk