Ben
Ben

Reputation: 2564

phpMyadmin can't set default value to Null

How to set varchar, text, int default to NULL in Mysql?

I have a table, some columns are optional for the user to fill.

I want to set the default to NULL if the user didn't fill any thing.

I try to do it in PHPMyAdmin, but I got error #1067 - Invalid default value

enter image description here

Upvotes: 5

Views: 6505

Answers (1)

Angelo Saleh
Angelo Saleh

Reputation: 622

Make sure that the option Null for the column be checked.

enter image description here

Upvotes: 6

Related Questions