Check if any column has NULL values in Postgres
December 7, 2020

To check whether a value is or is not null, use the constructs


expression IS NULL
expression IS NOT NULL

or the equivalent, but nonstandard, constructs

expression ISNULL
expression NOTNULL

Do not write expression = NULL because NULL is not “equal to” NULL.

The null value represents an unknown value, and it is not known whether two unknown values are equal. This behavior conforms to the SQL standard.


SELECT product_name, unit_price 
FROM products 
WHERE supplier_id IS NULL;


0 rows

Meaning, all the rows have their supplier_id.


Leave a Reply

Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 How to set opacity or transparency using CSS? #3 Pagination in CSS with multiple examples #4 How to make HTML form interactive and using CSS? #5 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #6 How to uninstall Cocoapods from the Mac OS?

Recently Posted

Mar 4 How to use data-* Attributes in HTML? Mar 4 The substr() method in JavaScript and how it’s different from substring() Mar 4 A complete guide to add responsive YouTube videos using HTML and CSS Mar 3 How to embed YouTube or other video links in WordPress? Mar 3 How to change the Login Logo in WordPress? Mar 3 substring() Method in JavaScript

You might also like these

How to add Go Back button in Swift 5?SwiftRIGHT JOIN in PostgresPostgresNumber Properties in JavaScriptJavaScriptWordPress 5.7 is migrating to latest jQuery version and people are freaking outjQueryWhat is the difference between Loosely Typed Language and Strongly Typed Language?MiscThe actual difference between indexOf() and search() in JavaScriptJavaScriptHow to create a Progress Bar using JavaScript?JavaScriptIf statement shorthand examples in JavaScriptJavaScriptThe Difference Between Arrays and Objects in JavaScriptJavaScript4 different ways to create JavaScript ObjectsJavaScriptNew to ┬áDrupal? Here’s What You Need to KnowDrupalWhat is Hadoop and Hadoop Ecosystem?Misc