From: AussieRules on
Hi,

I am trying to select all the records from a table where a field has a
certain value or is null.

I tried :

From: Gert-Jan Strik on
Try this:

SELECT my_column
FROM my_table
WHERE ( my_column = @certain_value OR my_column IS NULL )

--
Gert-Jan


AussieRules wrote:
>
> Hi,
>
> I am trying to select all the records from a table where a field has a
> certain value or is null.
>
> I tried :
From: --CELKO-- on
>> I am trying to select all the records [sic: rows are not records] from a table where a field [sic: columns are not fields] has a certain value or is NULL. <<

SELECT
FROM Foobar
WHERE vague_column = @in_search_value
OR vague_column IS NULL;

Why does this have the feel of homework in an intro SQL class?

Google up the new IS DISTINCT FROM comparison operator in Standard SQL
and impress your teacher with the reserch other people do for you.