select top 10 --(case when zb.Order_CreatedOn is null then '' when zb.Order_CreatedOn<>'1900-01-01' then zb.Order_CreatedOn end) as Order_CreatedOn,*--datetime类型不能转成'',如果转成'',返回给程序就是1900-01-01,''这种空字符串默认就会返回1900-01-01,所以不用在SQL里面转换,在程序里面用DBNUll.value来判断即可 --isnull(zb.Order_CreatedOn,''),* zb.Order_CreatedOn,* from dbo.GKOrder ck left join dbo.ZBOrder zb on ck.OrderID=zb.Order_TransactionID