Filtering NULL IN SQL

Filteing in SQL is achieved by the following functions:

    • Where Cloase
    • Having Clause&lt

    If you ahve to select elements from a table that has nulls, you can use the following query

    — Selecting rows where a specific column has null values
    SELECT *
    FROM your_table_name
    WHERE your_column_name IS NULL;

    Filter out NOT NULL

    — Selecting rows where a specific column does not have null values, we use the ‘IS NOT NULL’
    SELECT *
    FROM your_table_name
    WHERE your_column_name IS NOT NULL;
    fILTER

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top