table: A,  fields:(DateField,...)select isnull(DataField,'') from Atest it...

解决方案 »

  1.   

    select case year(htqd1) when 1900 then '' else convert(char(10),htqd1,120) end as htqd1 from lcda 
    我目前都是用这种方法解决的,不知道有没有更简单的方法。
      

  2.   

    update table 
    set column=null
    where column=cast('1900-01-01' as date)
      

  3.   

    直接用 null就可以,不必做转换:
    null即1900-01-01,1900-01-01即null,
      

  4.   

    Select case when htqd1='' then '' else convert(char(10),htqd1,120) end as htqd1 from lcda
      

  5.   

    to m_cen:
      不会吧。我用select isnull(htqd1,'') as isnull  from lcda
    为何所有的1900-01-01都出来了。我写的不对吗?
    数据库为sql server,htqd1为datetime型