Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 785
Jason Swett Avatar asked Jan 07 '11 17:01

Jason Swett


1 Answers

You can use the COALESCE function something like this:

COALESCE(yourfield, '')
like image 82
Sarfraz Avatar answered Nov 03 '22 18:11

Sarfraz