I am using a table “media_content” which has columns
id varchar(50) NOT NULL,
shorttitle varchar(200) DEFAULT NULL,
sourceimage blob
Later i modified the sourceimage column to default values as NULL
ALTER TABLE media_content
MODIFY COLUMN sourceimage VARCHAR(250) DEFAULT NULL;
Now i want to make the sourceimage column default as NONE, is it possible to do that?
You can specify the default value (of a string-type column) to be a string literal constant, such as
'NONE', but be aware that such a value has a very different meaning indeed toNULL(which indicates no value at all).As documented under Working with
NULLValues:If you merely wish to present
NULLvalues to your users in some other way, you should handle that at the presentation layer of your application.