not null condition check

10,369
... WHERE my_curr_date_time IS NOT NULL

NULL is a special value. It may mean "no value" or "value unknown". In SQL if you want to check if value is or not is NULL then you must use ... yes ... value IS NULL or value IS NOT NULL. It may be used with other conditions like:

... WHERE my_curr_date_time IS NOT NULL AND my_curr_date_time > start_dt
Share:
10,369
Bharanikumar
Author by

Bharanikumar

technical link click pannu pa Try pannunga

Updated on June 04, 2022

Comments

  • Bharanikumar
    Bharanikumar almost 2 years

    In Informix:

    how to check for not null,

    I have a field with datetime data type, and I don't have any default values for this field, but I have lot of empty/null records for this field.

    I want a query that will render the records:

    (  cond like )  where  my_curr_date_time != "" 
    

    but if I try this query, it is not working. Please tell which query for finding not null records.

  • Jonathan Leffler
    Jonathan Leffler about 13 years
    Except that the DATETIME type is peculiar to Informix, this answer applies to most variants of SQL and most data types.