Interview Question

What is IS NULL?

Use IS NULL or IS NOT NULL to test null values.

💡 Concept ✅ Quick Revision 🗃️ SQL

Answer

IS NULL tests whether a value is the SQL null marker. • NULL represents an unknown or absent value, not an ordinary value. • Comparing with = NULL does not return true. • Use IS NOT NULL to require a known value.

💡 SQL Example

SELECT name FROM employees WHERE manager_id IS NULL;

Result

Company director

⚡ Quick Revision

Use IS NULL or IS NOT NULL to test null values.