I had exported a bunch of tables (>30) as CSV files from MySQL database using phpMyAdmin. These CSV file contains NULL
values like:
"id","sourceType","name","website","location"
"1","non-commercial","John Doe",NULL,"California"
I imported many such csv to a PostgreSQL database with TablePlus. However, the NULL
values in the columns are actually appearing as text rather than null.
When my application fetches the data from these columns it actually retrieves the text 'NULL'
rather than a null value.
Also SQL command with IS NULL
does not retrieve these rows probably because they are identified as text rather than null values.
Is there a SQL command I can do to convert all text NULL
values in all the tables to actual NULL values? This would be the easiest way to avoid re-importing all the tables.