deRusett Posted December 3, 2003 Share Posted December 3, 2003 I was just building a DB for a project I am doing when it occered to me, I have never done `something` int(11) NOT NULL default \'\', always `something` int(11) NOT NULL default \'0\', what does mySQL do if I do `something` int(11) NOT NULL default \'\', the reason I ask is some of the formula I will be using, will talk to the something cell, will not work correctly if there is a 0 in that cell, BUT the default can not be a 1, I need it to ignore the cell if there is nothing in it. I\'m about 3 or 4 tables away from even droping this file into mySQL to make DB\'s and figured it wouldn\'t hurt to throw this question out to the world and see what comes back Quote Link to comment Share on other sites More sharing options...
deRusett Posted December 4, 2003 Author Share Posted December 4, 2003 Well it would seem that `something` int(11) NOT NULL default \'\', is not permitted, and one must use `something` int(11) NOT NULL default \'0\', everyone I have asked seems to think I will generate an error if I leave it as `something` int(11) NOT NULL default \'\', crappy! Quote Link to comment Share on other sites More sharing options...
triphis Posted December 5, 2003 Share Posted December 5, 2003 I haven\'t really worked with NOT NULL/NULL for mysql tables but doesn\'t NULL = 0? If you specified NOT NULL, then it makes sence that \'0\' wouldn\'t work as a value =/ Quote Link to comment Share on other sites More sharing options...
deRusett Posted December 5, 2003 Author Share Posted December 5, 2003 NULL does not equal zero, NULL is more can be igored, or Ignore this 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.