Subject Re: [firebird-support] Equivalant if IsNull() function in FireBird
Author Alexandre Benson Smith
Bhavbhuti Nathwani wrote:
> Hi all
>
> What is the equiv. of IsNull() in FireBird. I want to check if a
> value is null in the WHERE clause of a SELECT statement.
>
> Please advise.
>
If you want to check if a columna is null than use this:

Select * from YourTable where YourColumn is null

If you want to treat null as an ordinary value you could use COALESCE
(FB 1.5 and higher)

select * from YourTable where Coalesce(YourColumn, 0) = 0

Will return every row where YourColumn = 0 or YourColumn is null

see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br