Example of PostgreSQL CONCAT() function using column :
Sample Table: employees
If we want to display the first_name, last_name, and Name of the employee for those employees who belongs to the department which ID is 100 from employees table the following statement can be executed.
SELECT employee_id,first_name,last_name,
concat(first_name,' ',last_name) "Name of the Employee"
FROM employees
WHERE department_id=100;
Sample Output:
employee_id | first_name | last_name | Name of the Employee
-------------+-------------+-----------+----------------------
108 | Nancy | Greenberg | Nancy Greenberg
109 | Daniel | Faviet | Daniel Faviet
110 | John | Chen | John Chen
111 | Ismael | Sciarra | Ismael Sciarra
112 | Jose Manuel | Urman | Jose Manuel Urman
113 | Luis | Popp | Luis Popp
(6 rows)