Mega Code Archive

 
Categories / MySQL / Table Index
 

Changing a Columns Default Value

mysql> mysql> mysql> CREATE TABLE mytbl     -> (     ->     j INT,     ->     c CHAR(1)     -> ); Query OK, 0 rows affected (0.00 sec) mysql> mysql> mysql> ALTER TABLE mytbl ALTER j SET DEFAULT 1000; Query OK, 0 rows affected (0.01 sec) Records: 0  Duplicates: 0  Warnings: 0 mysql> mysql> drop table mytbl; Query OK, 0 rows affected (0.00 sec)