Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Concatenation
6. The CONCAT() function vs. the + operator
Simple text functions
How to modify Strings
Summary

Instruction

Great! You know two ways to concatenate values: the + operator and the CONCAT() function. What is the difference between them?

Think back to using the + operator. When there was a NULL value in one of the joining columns, what was returned? A NULL.

The CONCAT() function converts NULL to an empty string. Let's see this in an example. Remember, if any of the column you work with is NULL-able (i.e., can contain NULL) you should use the CONCAT() function and not the + operator.

Exercise

You see Vacum2010 as the product name, though there was a NULL value in the Type column.

Run the template and look at the result.