代码如下: -判断某些字段是否为空 –case select case when ‘字段名’ is null then ‘\N’ else convert(varchar(20),’字段名’) end as ‘NewName’ select case when null is null then ‘\N’ else convert(varchar(20),null) end as ‘NewName’ –SQL Server 2005:coalesce select coalesce(‘字符串类型字段’,’\N’) as ‘NewName’ select coalesce(convert(var