I am exporting a SELECT result to CSV via INTO OUTFILE. I have a series of simple SQL string functions I use to format the data. For instance: CONCAT('$',FORMAT(property.price,2)). I would like to otherwise return an empty string if the value is NULL, but I am unsure how to do both at the same time.
Also I am wondering the easiest way to take a TinyInt value of 0 or 1 and return “yes” or “no”.
For tinyint you can use IF operator
for first part you also can use if operator