Mega Code Archive

 
Categories / MySQL / Data Type
 

Default null value for Int type column

mysql> mysql> CREATE TABLE categories (     ->   id int(11) NOT NULL auto_increment,     ->   parentCatID int(11) default NULL,     ->   PRIMARY KEY (id)     -> ); Query OK, 0 rows affected (0.00 sec) mysql> mysql> mysql> drop table categories; Query OK, 0 rows affected (0.00 sec) mysql> mysql>