Complete the code to concatenate first_name and last_name without any separator.
SELECT CONCAT(first_name [1] last_name) AS full_name FROM employees;The CONCAT function in MySQL takes multiple arguments separated by commas and joins them into one string.
Complete the code to concatenate first_name and last_name with a space between them using CONCAT_WS.
SELECT CONCAT_WS([1], first_name, last_name) AS full_name FROM employees;CONCAT_WS joins strings with a separator as the first argument. To add a space, use ' ' as the separator.
Fix the error in the code to concatenate city and state with a comma and space using CONCAT_WS.
SELECT CONCAT_WS([1], city, state) AS location FROM addresses;The separator should be a comma followed by a space: ', ' (with no extra spaces inside quotes).
Fill both blanks to concatenate first_name, middle_name, and last_name with spaces, skipping NULL middle_name.
SELECT CONCAT_WS([1], first_name, [2], last_name) AS full_name FROM employees;
CONCAT_WS uses the first argument as separator (space here). Middle_name is the column to include, and CONCAT_WS skips NULL values automatically.
Fill all three blanks to concatenate street, city, and zip code separated by commas and spaces.
SELECT CONCAT_WS([1], street, [2], [3]) AS address FROM locations;
Use ', ' as separator. Include city and zip_code columns in order to form full address.