22.08.2012, 08:21
To set a default value:
So, for example, you want "score" to be set to 0 on default nd the table is called "users", you need to do:
PHP код:
ALTER TABLE `table_name` CHANGE `column_name` `column_name` TYPE DEFAULT `default_value`;
PHP код:
ALTER TABLE `users` CHANGE COLUMN `score` `score` INT DEFAULT 0;