bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

SQL Server CONCAT_WS() Function

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind SQL Server 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.

___('.', 'www', 'ExampleSite', 'com');
3Order

Put the learning moves in the order that makes the concept easiest to apply.

The CONCAT_WS() function adds two or more strings together with a separator.
Definition and Usage
SQL Server CONCAT_WS() Function

Example

SELECT
CONCAT_WS('.', 'www', 'ExampleSite', 'com');

Definition and Usage

The CONCAT_WS() function adds two or more strings together with a separator.

Note

See also CONCAT() and Concat with the + operator .

Syntax

CONCAT_WS(
separator, string1
,
 string2
,
....
,
string_n
)

Parameter Values

ParameterDescription
separatorRequired. The separator to use
string1, string2, string_nRequired. The strings to add together

Technical Details

Works in:SQL Server (starting with 2017), Azure SQL Database, Azure SQL Data Warehouse

Previous

SQL Server Concat With +

Next

SQL Server DATALENGTH() Function