Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

It is currently Wed Apr 14, 2021 5:41 am

Message body:
Enter your message here, it may contain no more than 60000 characters. 

:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
Font colour
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation code
Confirmation code:
In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.

Topic review - Mysql change column's default value
Author Message
Post subject: Mysql change column's default value  |  Post Posted: Thu Aug 12, 2010 3:43 am
mysql> ALTER TABLE table_name MODIFY column_name INT DEFAULT 'some default value';

Remember that column type must be a char, varchar, enum or some other column type that supports default value. TEXT/BLOB columns do NOT support default values.

If an attempt to set a text column's default value a mysql error will be produced:
ERROR 1101 (42000): BLOB/TEXT column 'preferences' can't have a default value
Jump to:  
cronNews News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list

Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]