Using the default key word to insert value : Default « Table « MySQL Tutorial






mysql>
mysql>
mysql> CREATE TABLE Test(State char(2) NOT NULL DEFAULT "KY");
Query OK, 0 rows affected (0.03 sec)

mysql>
mysql> insert into Test (state) value (default);
Query OK, 1 row affected (0.01 sec)

mysql>
mysql> select * from Test;
+-------+
| State |
+-------+
| KY    |
+-------+
1 row in set (0.02 sec)

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

mysql>
mysql>








4.13.Default
4.13.1.Using the default key word to insert value