Skip
Arish's avatar

42. Finding Non-NULL Values


IS NOT NULL

Find rows WITH values.

Syntax

sql
1SELECT * FROM students
2WHERE phone IS NOT NULL;

Example

Students with phone numbers:

sql
1SELECT * FROM students
2WHERE phone IS NOT NULL;

Combined with Other Conditions

sql
1SELECT * FROM students
2WHERE phone IS NOT NULL
3AND course = 'Python';