|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Say I try to run the following on MySQL 5:
CREATE TABLE test ( test TEXT NULL DEFAULT '' ); Doing so yields a "BLOB/TEXT column 'test' can't have a default value" error. Given that, why does the following work?: CREATE TABLE test ( test TEXT NULL DEFAULT NULL ); |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
yawnmoth wrote:
> Say I try to run the following on MySQL 5: > > CREATE TABLE test ( > test TEXT NULL DEFAULT '' > ); > > Doing so yields a "BLOB/TEXT column 'test' can't have a default value" > error. Given that, why does the following work?: > > CREATE TABLE test ( > test TEXT NULL DEFAULT NULL > ); > Because NULL is not a value. It is a state. Norm |
|
![]() |
| Outils de la discussion | |
|
|