28

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

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

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..

thirtydot
  • 224,678
  • 48
  • 389
  • 349
Shaun
  • 2,313
  • 7
  • 36
  • 43
  • You can use triggers [*how to give Default Text like 'not updated' to text type in sql*](http://stackoverflow.com/questions/23886364/how-to-give-default-text-like-not-updated-to-text-type-in-sql) – M Khalid Junaid May 27 '14 at 13:03

1 Answers1

41

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.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356