4

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' 
4

2 に答える 2

6

You're not allowing it to be null and then setting it to null as a default value.

于 2012-06-09T13:07:45.870 に答える
1

You've set a default value of NULL for a column that can't be NULL

于 2012-06-09T13:09:54.090 に答える