How to add space between two name columns concatenated in SQL ?
SELECT CONCAT(a.first_name, a.last_name), f.title, f.description, f.length
FROM actor a
JOIN film_actor fa
ON a.actor_id = fa.actor_id
JOIN film f
ON f.film_id = fa.film_id
i want to have space between names like "PenelopeGuiness" to "Penelope Guiness"
CodePudding user response:
SELECT CONCAT(a.first_name, " ", a.last_name), f.title, f.description, f.length
FROM actor a
JOIN film_actor fa
ON a.actor_id = fa.actor_id
JOIN film f
ON f.film_id = fa.film_id
CodePudding user response:
I tried to add ' '
inside CONCATE parameters but id did not work!
Anyway, I just found below solution and it worked.
SELECT a.first_name || ' ' || a.last_name AS full_name