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? Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.