Default null value for Int type column : Int « Data Type « SQL / MySQL






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>

   
    
    
    
    
  








Related examples in the same category

1.Int(11) not null
2.INTEGER(4) ZEROFILL
3.The width specification is most often used with zerofill
4.Compare with integers
5.INT UNSIGNED
6.How MySQL deals with non-exist number