From the course: Microsoft SQL Server 2016: Query Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with NULL

Working with NULL - SQL Server Tutorial

From the course: Microsoft SQL Server 2016: Query Data

Start my 1-month free trial

Working with NULL

- [Instructor] In this lesson, we're going to take a look at how we can work with NULLs in SQL Server. Now a NULL value is considered to be an undefined value. It's not that it doesn't exist or that we didn't put a value into the field, it's just that whatever might happen to be in that field in the database is undefined. So, there isn't something there that we can do a comparison to. Let's take a look at one of the queries that we executed in a previous lesson, which was using the WHERE clause to return records from an employee table. We're using the LIKE keyword and we're using wild card characters. And again, this is just for review purposes, but the reason I wanted to show this was that it's an example of using what we refer to as two-predicate logic. And, what I mean by two-predicate logic is that we are comparing, really two values. Job title against some specific text. So that's considered two-predicate logic. Now, if we take a look at NULL values and two-predicate logic, it…

Contents