Complete the code to concatenate first_name and last_name without any separator.
SELECT CONCAT(first_name, [1]) AS full_name FROM employees;The CONCAT function joins the strings given as arguments. To join first_name and last_name, you need to include last_name as the second argument.
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. To add a space between first_name and last_name, 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;CONCAT_WS requires a single string separator as the first argument. Using ', ' (comma and space inside quotes) correctly separates city and state.
Fill both blanks to concatenate street, city, and state with ', ' as separator using CONCAT_WS.
SELECT CONCAT_WS([1], street, [2], state) AS full_address FROM addresses;
CONCAT_WS uses ', ' as the separator. street, city, and state are concatenated with ', ' between them.
Fill all three blanks to concatenate first_name, middle_name, and last_name with spaces using CONCAT_WS.
SELECT CONCAT_WS([1], first_name, [2], [3]) AS full_name FROM employees;
CONCAT_WS(' ', first_name, middle_name, last_name) joins the three names with spaces between them.