Has anyone else experienced this problem? I'm attempting to SQL concat two fields and if the second field is null, the entire string appears as null. The documentation is unclear on the expected outcome, and contrary to how concat_ws operates.
SELECT
substr(users.first, 0, 1),
users.first,
users.last,
CONCAT(
substr(users.first, 0, 1),
' ',
users.last
) as abbr_name
FROM
users
Here is an example of what I receive.
Does anyone have any suggestions on how to get the results I've shown abbr_name without being entirely null if there is no last name?
Thanks,
Steve