文本列的默认值

问题描述:

我的表中有一列,数据类型为TEXT.

I have a column in my table having data type as TEXT.

如何给它提供默认的NULL值,以便在该列中没有条目时不占用内存.

How can I give it a default NULL value, so that when there is not entry in the column it doesn't consume memory.

我在一个论坛上读过一个类似的问题,他们说应该允许该列中包含null值;我是这样做的,但是那是行不通的.

I was reading a similar question on a forum where they said column should be allowed for null values; I did that but it doesn't work..

TEXT不支持除NULL以外的任何默认值.因此,它隐式为DEFAULT NULL,因此您无需更改任何内容.

TEXT does not support default values of anything but NULL. As such, it's implicitly DEFAULT NULL, so you should not need to change anything.