Languages
[Edit]
EN

MS SQL Server - CONCAT() function example

0 points
Created by:
Roseanne-Read
1335

In this article, we would like to show you CONCAT() function example in MS SQL Server.

Quick solution:

SELECT CONCAT('expression1', 'expression2', 'expressionN')
AS [alias_name];

or:

SELECT 'expression1' + 'expression2' + 'expressionN'
AS [alias_name];

Practical example

In this example

Query:

SELECT CONCAT('Simon', ' ', 'Collins', ' ', '987-654-321')
AS 'phone_contact';

Result:

MS SQL Server - CONCAT() function result in HeidiSQL
MS SQL Server - CONCAT() function result

 

Note:

CONCAT() function can be also used to merge values or search many columns. Go to this article to see more complex examples.

Related posts

Alternative titles

  1. MS SQL Server - concatenation function example
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

MS SQL Server - functions

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join