Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
5. The CONCAT() function
Simple text functions
How to modify Strings


Excellent! You can use the + operator to concatenate string values, but it is not the only way to do so. T-SQL also provides the CONCAT() function. You can use values as parameters in this function. They have to be separated by commas.

Here is how to use CONCAT() to join a slogan's ID, type, and copywriter ID:

  CONCAT(Id, N' ', Type, N' ', CopywriterId) AS Slogan
FROM Slogan;

Notice that we included spaces as constant values here as well.


For each item, show the following sentence:

ID X is Y.

Where X is the Id of the item and Y is its name. Name the column ItemName.

Stuck? Here's a hint!

Use the CONCAT() function with five arguments. Remember to add spaces and a period in the correct places.