Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put a space between two SQL columns after joining them?

Tags:

syntax

sql

I have joined two columns, first name\last name into one and named it with an alias which is all good. But how do I put a space between first and last name?

au.first_name || au.last_name Name
like image 849
Murray Avatar asked Sep 15 '25 01:09

Murray


2 Answers

here:

au.first_name || ' ' || au.last_name Name
like image 64
John Woo Avatar answered Sep 17 '25 14:09

John Woo


You can add the space in the same manner that you have concatenated the first and last names,

au.first_name ||' ' || au_last_name name
like image 33
No'am Newman Avatar answered Sep 17 '25 16:09

No'am Newman