如何处理数据库中日期型的字段为空的数据?谢谢

解决方案 »

  1.   

    select isnull(dateColumn,getdate()) from TableName
      

  2.   

    Select Distinct abcDate From table
    结果中有空的日期,有非空,一般的方法就会出错
      

  3.   

    不知道你允许NULL的意思是否是:该字段可输入,也可以不输入!!你将日期字段设置为:不允许NULL,设置默认值,如果用户不愿意输入日期,这样也可以啊 !!