文本列的默认值 [英] Default value for a text column

查看:110
本文介绍了文本列的默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的表中有一列,数据类型为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.

这篇关于文本列的默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆