Skip to ContentMini Arrow Down Icon
  • Codecademy Logo
  • Codecademy Logo
AND
BETWEEN
EXISTS
IN
IS NOT NULL
IS NULL
LIKE
NOT
OR
Back to SQL
  1. Docs/
  2. SQL/
  3. Operators/
  4. IS NOT NULL

IS NOT NULL

Open IconEdit on GitHub

The IS NOT NULL operator checks if a value is not equal to NULL.

Syntax

SELECT column_name(s)
FROM table_name
WHERE condition IS NOT NULL;

Example

The given query will select all customers who have a birthday stored in the database.

SELECT *
FROM customers
WHERE birthday IS NOT NULL;

Contributors

  1. BrandonDusch's avatar'
    BrandonDusch
  2. net8535613879's avatar'
    net8535613879
  3. JeremyBarbosa's avatar'
    JeremyBarbosa
Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.
Open IconEdit on GitHub

Learn SQL on Codecademy

Skill path

Analyze Data with SQL

Learn to analyze data with SQL and prepare for technical interviews.
Checker Dense
Includes 8 Courses
Checker Dense
Certificate Icon
With Certificate
Checker Dense
Level Icon
Beginner Friendly
15 Lessons
Skill path

Design Databases With PostgreSQL

Learn how to create and optimize a database from scratch using PostgreSQL
Checker Dense
Includes 5 Courses
Checker Dense
Certificate Icon
With Certificate
Checker Dense
Level Icon
Beginner Friendly
11 Lessons
Free course

Learn SQL

In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.
Checker Dense
Level Icon
Beginner Friendly
4 Lessons
Open IconEdit on GitHub

Contributors

  1. BrandonDusch's avatar'
    BrandonDusch
    BrandonDusch's avatar'
    BrandonDusch142 contributions
  2. net8535613879's avatar'
    net8535613879
    net8535613879's avatar'
    net853561387924 contributions
  3. JeremyBarbosa's avatar'
    JeremyBarbosa
    JeremyBarbosa's avatar'
    JeremyBarbosa13 contributions

Company

  • About
  • Careers
  • Affiliates
    • Twitter Icon
    • Facebook Icon
    • Instagram Icon
    • Youtube Icon

Resources

  • Articles
  • Blog
  • Cheatsheets
  • Code challenges
  • Docs
  • Projects
  • Videos
  • Workspaces

Support

  • Help Center

Resources

  • Articles
  • Blog
  • Cheatsheets
  • Code challenges
  • Docs
  • Projects
  • Videos
  • Workspaces

Support

  • Help Center

Plans

  • Paid memberships
  • For students
  • Business solutions

Community

  • Forums
  • Chapters
  • Events
  • Discord

Codecademy from Skillsoft

Codecademy from Skillsoft

Subjects

  • AI
  • Cloud Computing
  • Code Foundations
  • Computer Science
  • Cybersecurity
  • Data Analytics
  • Data Science
  • Data Visualization
  • Developer Tools
  • DevOps
  • Game Development
  • IT
  • Machine Learning
  • Math
  • Mobile Development
  • Web Design
  • Web Development

Languages

  • Bash
  • C
  • C++
  • C#
  • Go
  • HTML & CSS
  • Java
  • JavaScript
  • Kotlin
  • PHP
  • Python
  • R
  • Ruby
  • SQL
  • Swift

Career building

  • Career paths
  • Career services
  • Interview prep
  • Professional certification
  • —
  • Full Catalog
  • Beta Content
  • Roadmap

Mobile

  • Download on the App Store
  • Get it on Google Play

Mobile

  • Download on the App Store
  • Get it on Google Play
  • Privacy Policy
  • Cookie Policy
  • Do Not Sell My Personal Information
  • Terms
Made with ❤️in NYC © 2023 Codecademy