Press "Enter" to skip to content

Dealing with NULL and Empty String in Multiple RDBMS Platforms

Akhil Reddy Banappagari compares three popular platforms:

When you are planning database migrations to PostgreSQL, it is usually the small things that cause the biggest production bugs. One of the most common traps for developers is how different databases handle NULL and empty strings ('').

While they might seem like similar concepts, representing the absence of a value, the way a database engine interprets them can change your query results, break your unique constraints, or cause data loads to fail. In this guide, we will compare the behavior of OracleSQL Server, and PostgreSQL to help you avoid common migration pitfalls.

PostgreSQL and SQL Server are close in the way in which they deal with NULL and empty strings, but all three platforms have at least some differentiation, so if you’re deeply familiar with one, the next platform may trip you up a little.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.