Table with default value : Default Value « Table Index « SQL / MySQL






Table with default value

    
mysql>
mysql> CREATE TABLE occupation(
    ->    author VARCHAR(255) NOT NULL,
    ->    occupation VARCHAR(255) DEFAULT "Unknown Occupation"
    -> );
Query OK, 0 rows affected (0.01 sec)

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

   
    
    
    
  








Related examples in the same category

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