请教:isdn char(100) NOT NULL default '0',如果不限制 NOT NULL,也可以default '0' 么?如
isdn char(100)  default '0', 
这两者有区别么?

解决方案 »

  1.   

    区别就是
    isdn char(100)  default '0', 可以
    insert into tablename (isdn) values (NULL); 而isdn char(100) NOT NULL default '0', 不可以
    insert into tablename (isdn) values (NULL); 
    ERROR 1048 (23000): Column 'isdn' cannot be null其他没了
      

  2.   

    那这样的话岂不是 isdn char(100)  default '0',更宽泛,可为什么大家总喜欢用
    isdn char(100) NOT NULL default '0',呢?只是习惯么?
      

  3.   

    1.在外连接的时候 NULL有一定的特殊意义
    2.有些应用程序0,NULL是有不同含义,和需求的
    其他也没什么了
      

  4.   

    一个可以插NULL,一个不可以插!