开发者

MS Access SQL replace NULL in field value

I would like to show the value "NONE" if the value in a field is null OR its value if th开发者_如何学Ce field is not null from a table using select statement. The statement may be similar to this:

select iif(isnull(spouse),"NONE",spouse) as spouse from biodata


SELECT Nz(spouse,"NONE") AS Nzspouse FROM biodata

Nz() replaces spouse with "NONE" if spouse was NULL, otherwise it returns spouse.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜