amazon-redshiftsql-workbench-j

How can I differentiate between null value and empty string in query result?


I ran the following sql statement in SQL Workbench/J for redshift:

select null, ' ', len(' ')

This is what it returned. How can I differentiate between the null value and the empty string? In both, it shows as an empty string. I added the len just to make sure redshift wasn't truncating it.

enter image description here


Solution

  • Your workbench can be configured to display NULL with a string, like "NULL". See: https://www.sql-workbench.eu/manual/options.html