Defining Default Values : Default Value « Table Index « SQL / MySQL






Defining Default Values

      
mysql>
mysql> CREATE TABLE AuthorBios
    -> (
    ->     AuthID SMALLINT UNSIGNED NOT NULL,
    ->     YearBorn YEAR NOT NULL,
    ->     CityBorn VARCHAR(40) NOT NULL DEFAULT 'Unknown'
    -> );
Query OK, 0 rows affected (0.01 sec)

mysql>
mysql> drop table AuthorBios;
Query OK, 0 rows affected (0.00 sec)

   
    
    
    
    
    
  








Related examples in the same category

1.Specifying Default Values 1
2.Table with default value
3.Change default value
4.Check default