当前位置: 技术问答>java相关
空字段显示
来源: 互联网 发布时间:2015-01-28
本文导语: 数据库查询结果显示在table中的时候,遇到某些字段为空时会显示Null,请问如何显示 为" "? | 原: select a1,a2 from a 現: SQL Server: select isnull(a1," "),isnull(a2," ") from a Oracle: select nvl(a1," "),nvl(...
数据库查询结果显示在table中的时候,遇到某些字段为空时会显示Null,请问如何显示
为" "?
为" "?
|
原:
select a1,a2 from a
現:
SQL Server:
select isnull(a1," "),isnull(a2," ") from a
Oracle:
select nvl(a1," "),nvl(a2," ") from a
select a1,a2 from a
現:
SQL Server:
select isnull(a1," "),isnull(a2," ") from a
Oracle:
select nvl(a1," "),nvl(a2," ") from a
|
oracle中应该是select nvl(a1,' '),nvl(a2,' ') from a
是单引号啊
是单引号啊