Jump to: navigation, search

PostgreSQL CONCAT

From w3cyberlearnings

Contents

Postgresql concat

Concates all arguments to a string.

Syntax concat

concat(str1,str2,str3)

Example 1

test2=# SELECT concat('apple', 2,NULL,43);
  concat  
----------
 apple243
(1 row)

Example 2

test2=# SELECT concat(user_firstname,' ',user_lastname) as fullname
test2-# FROM profile;
  fullname   
-------------
 Jim Jkim
 king queen
 Jammi weeks
 Bob Mark
  
(5 rows)

Related Links


Navigation
Web
SQL
MISC
References