Reputation: 271764
RIght now the server default is 1. How can I change it to 0?
THis is currently the column:
+----------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+----------------+
friend_posting | tinyint(1) | NO | | 1 | |
It has no foreign keys or anything.
Upvotes: 1
Views: 46
Reputation: 12973
http://dev.mysql.com/doc/refman/5.1/en/alter-table.html
ALTER TABLE table_name
ALTER COLUMN friend_posting
SET DEFAULT 0
This won't change existing rows of course; they will need to be explicitly updated. It only sets the default for new rows.
Upvotes: 1