Reputation: 651
I executed the query below
ALTER TABLE `users` CHANGE `phone` `phone` VARCHAR( 20 )
CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT NULL
and result was ...
#1067 - Invalid default value for 'phone'
Upvotes: 4
Views: 2556
Reputation: 152491
You've set a default value of NULL for a column that can't be NULL
Upvotes: 1
Reputation: 276266
You're not allowing it to be null and then setting it to null as a default value.
Upvotes: 6