HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
MySQL Functions : Add several expressions together, and add a "-" separator between them
The CONCAT_WS() function adds two or more expressions together with a separator.
CONCAT_WS(separator, expression1, expression2, expression3,...)
Parameter | Description |
---|---|
separator | Required. The separator to add between each of the expressions. If separator is NULL, this function returns NULL |
expression1, expression2, expression3, etc. |
Required. The expressions to add together. An expression with a NULL value will be skipped |
Works in: | From MySQL 4.0 |
---|
Add three columns (and add a space between them) into one "Address" column:
SELECT CONCAT_WS(" ", Address, PostalCode, City) AS Address
FROM
Customers;