Flash cards
Review the key moves
1/4
Core idea
What is the main idea behind MySQL CONCAT_WS() Function?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
1Quick choice
Which statement best captures the main point of this lesson?
2Fill blank
Complete the missing token from the example code.
___ CONCAT_WS("-", "SQL", "Tutorial", "is", "fun!") AS ConcatenatedString;3Order
Put the learning moves in the order that makes the concept easiest to apply.
The CONCAT_WS() function adds two or more expressions together with a separator.
Definition and Usage
MySQL CONCAT_WS() Function
Example
SELECT CONCAT_WS("-", "SQL", "Tutorial", "is", "fun!") AS ConcatenatedString;Definition and Usage
The CONCAT_WS() function adds two or more expressions together with a separator.
Note
Also look at the CONCAT() function.
Syntax
CONCAT_WS(
separator
,
expression1
,
expression2
,
expression3
,...)Parameter Values
| 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 |
Technical Details
| Works in: | From MySQL 4.0 |
|---|