Search code examples
mysqlsqlinto-outfile

Remove "\N"s when doing SELECT INTO OUTFILE


I'm doing a SELECT INTO OUTFILE and it's showing a "\N" for every NULL value. Is there any way for me to make it just be blank instead?

I'm on MySQL.


Solution

  • You can use the COALESCE function something like this:

    COALESCE(yourfield, '')