Setting a column's default value by adding a constraint
This is a rather contrived example, but you'll get the idea.

mysql&gt; create table b(a int primary key, c varchar(3), unique key x_b_uk (c));
Query OK, 0 rows affected (0.46 sec)

mysql&gt; alter table b alter c set default 'xyz';
Query OK, 0 rows affected (0.05 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql&gt; insert into b (a) values(1);   &lt;&lt;== didn't set field c!
Query OK, 1 row affected (0.39 sec)

mysql&gt; select * from b;
+---+------+
| a | c    |
+---+------+
| 1 | xyz  |                    &lt;&lt;===== value of c = 'xyz'!
+---+------+
1 row in set (0.16 sec)

mysql&gt; 


Check here.