Null Predicate (SQL)

Help Contents

Introduction

The SQL Null Predicate tests whether a value is NULL and returns either TRUE or FALSE.

Syntax

null-predicate ::=
  test-expression null-predicate-part2

null-predicate-part2 ::=
  IS [ NOT ] NULL

Syntax Details

test-expression is the Value Expression being tested.

NOT is an optional keyword that negates the result

The null-predicate-part2 can be used as a test in the when-operand of a Case Function.

Remarks

The predicate X IS NOT NULL is equivalent to NOT( X IS NULL ).

Examples

To find all fixed precision columns in the database schema:

SELECT * FROM information_schema.columns
WHERE table_name = 'TagDataPointAnalog' AND 
    decimal_digits IS NOT NULL

Further Information

Predicates

To learn about other types of predicate.

Fernhill SCADA Structured Query Language (SQL)

To learn more about the SQL features in Fernhill SCADA.

Glossary

For the meaning of terms used in Fernhill SCADA.