0

Is the order of NOT NULL and AUTO_INCREMENT statements after the column name important?

CREATE TABLE test ( id int NOT NULL AUTO_INCREMENT , name varchar(30) NOT NULL, PRIMARY KEY (id) );

17th Aug 2020, 11:09 PM
Ali Rezaei
Ali Rezaei - avatar
2 Respuestas
+ 1
No, it is not mandatory for it to be declared that way. After all these are just constraints and can be in any order.
18th Aug 2020, 7:46 AM
Avinesh
Avinesh - avatar
+ 1
A trial and error is best answer for this doubt : )
18th Aug 2020, 2:23 AM
Ipang