Загрузка...

SQL Interview Question #9 | What is NULL in SQL?

SQL Interview Question #9

What is NULL in SQL?

NULL represents missing, unknown, or unavailable data.

❌ NULL is not 0

❌ NULL is not an empty string

✅ NULL means no value exists

Example:

An employee has not provided an email address yet.

Email = NULL

Filtering NULL Values:

To find NULL values:

SELECT * FROM Employees
WHERE Email IS NULL;

To find non-NULL values:

SELECT * FROM Employees
WHERE Email IS NOT NULL;

💡 Daily Use Case:

In real-world applications, fields like Email, Phone Number, Middle Name, or Address may contain NULL values when the information is not available.

💡 Interview Tip:

Never use = NULL

Always use IS NULL or IS NOT NULL

🔔 Subscribe for daily SQL interview questions and SQL Server interview preparation.

#sql #sqlserver #mssql #null #database #sqlinterview #interviewquestions #learnsql #dba #softwareengineer

Видео SQL Interview Question #9 | What is NULL in SQL? канала Krish for tech
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять