dansk Posted January 2, 2007 Share Posted January 2, 2007 ALTER TABLE `articles` CHANGE `Image_Link` `Image_Link` TEXT CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT 'I_Logo.gif'MySQL said: Documentation#1101 - BLOB/TEXT column 'Image_Link' can't have a default value how can i make it have a default value? Link to comment https://forums.phpfreaks.com/topic/32545-cant-have-a-default-value/ Share on other sites More sharing options...
fenway Posted January 3, 2007 Share Posted January 3, 2007 You can't. Link to comment https://forums.phpfreaks.com/topic/32545-cant-have-a-default-value/#findComment-151880 Share on other sites More sharing options...
dansk Posted January 3, 2007 Author Share Posted January 3, 2007 LOL fenway,that was quick. Can I create a field that if no one inserted anything in there, it would assign it to a default value. I am willing to create a new field to do that. Thank you Link to comment https://forums.phpfreaks.com/topic/32545-cant-have-a-default-value/#findComment-151986 Share on other sites More sharing options...
wildteen88 Posted January 3, 2007 Share Posted January 3, 2007 You can use varchar. Varchar can have a default value. However varchar can only store 255 characters maximum. Text can store about 65,000 characters or more. Link to comment https://forums.phpfreaks.com/topic/32545-cant-have-a-default-value/#findComment-152310 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.