Search
 
SCRIPT & CODE EXAMPLE
 

SQL

String concatenation in PostgreSQL

-- with functions
CONCAT(first_name,' ', last_name) AS full_name;

-- with string concatenation operator
SELECT first_name || ' ' || last_name AS full_name FROM customer;

-- String concatenation with a non-string input
SELECT customer_id || ': ' || first_name || ' ' || last_name AS full_name
FROM customer;
Comment

postgresql concat string with separator

SELECT
	concat_ws (', ', last_name, first_name) AS full_name
FROM
	customer
ORDER BY
	last_name;Code language: SQL (Structured Query Language) (sql)
Comment

PREVIOUS NEXT
Code Example
Sql :: pgadmin see indexes 
Sql :: oracle list days between two dates 
Sql :: read xml in sql server 
Sql :: How to find string in substring in sql server 
Sql :: mysql workbench tutorial 
Sql :: select odd records sql 
Sql :: update value sql 
Sql :: postgresql backup and restore globals and data 
Sql :: POSTGRES INSERT INTO TABLE VALUE FROM OTHER TABLE 
Sql :: mysql datetime format 
Sql :: postgresql could not start server mac 
Sql :: phone number regex sql 
Sql :: redo files log oracle 
Sql :: how to make case insensitive in sql 
Sql :: difference between outer join and inner join sql 
Sql :: oracle drop default value 
Sql :: how to find top 3 salary in sql 
Sql :: mysql insert rows to another database 
Sql :: what is non relational database 
Sql :: close external port 3306 with iptables 
Sql :: Mysql table variables 
Sql :: what is cursor in sql server with example 
Sql :: show specific events on mysql 
Sql :: sql max min 
Sql :: get size of mysql database 
Sql :: mysql pad zeros 
Sql :: trigger sql 
Sql :: get last record deluge 
Sql :: load data from text file to mysql database on mac terminal 
Sql :: memberikan password root mysql 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =