I\'m trying to find a way to combine two columns into one, but keep getting the value \'0\' in the column instead to the combination of the words.
These are what I\'
For the MySQL fans out there, I like the IFNULL() function. Other answers here suggest similar functionality with the ISNULL() function in some implementations. In my situation, I have a column of descriptions which is NOT NULL, and a column of serial numbers which may be NULL This is how I combined them into one column:
SELECT CONCAT(description,IFNULL(' SN: ', serial_number),'')) FROM my_table;
My results suggest that the results of concatenating a string with NULL results in a NULL. I have been getting the alternative value in those cases.