epsilones
epsilones

Reputation: 11629

Setting column from not null to null - mysql

For some reason, I have to change the default value of one parameter 'param' in a mysql table, I have to set it to NULL by default. I tried to manage it through phpmyadmin and I get this error message :

ALTER TABLE  `mytable` CHANGE  `param`  `param` VARCHAR( 150 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT NULL

How can I resolve this ?

Upvotes: 0

Views: 125

Answers (1)

Niet the Dark Absol
Niet the Dark Absol

Reputation: 324800

You can't set a NOT NULL column to have DEFAULT NULL.

In phpMyAdmin, check the Null? box for the column when editing it.

Upvotes: 2

Related Questions