MS Access SQL replaces NULL value with field value

I would like to show the value "NONE" if the value in the field is null or its value if the field is not null from the table using the select statement. The statement may be similar to the following:

select iif(isnull(spouse),"NONE",spouse) as spouse from biodata
+5
source share
1 answer
SELECT Nz(spouse,"NONE") AS Nzspouse FROM biodata

Nz()replaces spousewith "NONE"if it spousewas NULL, otherwise it returns spouse.

+8
source

All Articles