Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Concat firstname and lastname with space in between in oracle pl sql

I have one requirement to concat user first_ name, and last_name with space in between in Oracle. Ex: first_name is 'Hopkins' and last_name is 'Joe'.

Full name should be printed as Hopkins Joe.

I'm using Oracle 11g and it is working in SQL query, but not working in stored procedure.

like image 427
Ram Avatar asked Jan 05 '23 05:01

Ram


1 Answers

Try this:

 SELECT CONCAT(CONCAT(first_name, ' '),last_name)

OR

 SELECT first_name || ' ' || last_namefrom;
like image 172
Jibin Balachandran Avatar answered Jan 07 '23 21:01

Jibin Balachandran