Table of Contents
The proper syntax is:
SELECT . . ., NULLIF(columnname, '')
FROM schema.table;
UPDATE schema.table SET columnname=NULL where columnname='';That is NULLIF() is a function. If you want to return the value, then it needs to be used in the SELECT. Just hanging around after the FROM clause is not valid SQL.
https://stackoverflow.com/questions/60580146/postgres-convert-empty-string-to-null