cursed Posted February 11, 2007 Share Posted February 11, 2007 What does default '0' do? example: CREATE TABLE `a` ( `id` int(10) unsigned NOT NULL, `owner` int(11) NOT NULL default '0', `race` varchar(100) NOT NULL default '', `hunger` varchar(10) NOT NULL default '100', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1 ; and would it cause anything drastic if i delete it? Link to comment https://forums.phpfreaks.com/topic/37978-newbie-what-does-this-do-question/ Share on other sites More sharing options...
artacus Posted February 11, 2007 Share Posted February 11, 2007 Nothing, its what the default value that is entered if a null is entered, but since its a non-nullable field, it does nothing. Link to comment https://forums.phpfreaks.com/topic/37978-newbie-what-does-this-do-question/#findComment-181726 Share on other sites More sharing options...
fenway Posted February 11, 2007 Share Posted February 11, 2007 Nothing, its what the default value that is entered if a null is entered, but since its a non-nullable field, it does nothing. Not so -- it's the default value for this column for an INSERT if no value is specified. Link to comment https://forums.phpfreaks.com/topic/37978-newbie-what-does-this-do-question/#findComment-182275 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.