From the course: Complete Guide to SQL for Data Engineering: from Beginner to Advanced

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Debugging NULL values

Debugging NULL values

- [INstructor] Debugging null values in SQL is a crucial aspect of database management. It is important because null represent the absence of a value in a column. Null is not same as empty string or zero. It signifies unknown or not applicable. Misunderstanding or mishandling of null values can relate to unexpected results or logical errors in your SQL queries. Let's go back to over PG admin and see how we can handle the null values. Let's say I want to find out all the products for which the price is null. If I say something like that, select start from products where price equal to null and I do this. This will not going to work because you cannot compare null with the null. Null is a kind of unknown. You cannot say one unknown is equal to another unknown. If you do this, you will not get any result, but if you say something like this, where price is null and then you execute, you see the two result where price column…

Contents