DEFAULT applies to INSERTs, NOT NULL applies to UPDATEs too.

In MySQL it applies to both (ie. if you UPDATE to an invalid value, it sets it to 'something').


NOT NULL without default is useful when you want to be sure you'll never forget to put a value in that column, when there is no meaningful default. Also for foreign keys : what would be the default value of a foreign key ?


gnari



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly




---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings

Reply via email to