# How to use concat in select statement?

How to Use SQL CONCAT. SELECT CONCAT(string1, string2, string3, ...); Each argument is a string or expression. The function returns a single string with all inputs joined together.

Bron: [SQL CONCAT() Function: Syntax, Usage, and Examples - Mimo](https://mimo.org/glossary/sql/concat#:~:text=How%20to%20Use%20SQL%20CONCAT&text=SELECT%20CONCAT(string1%2C%20string2%2C,with%20all%20inputs%20joined%20together.)

Onderwerp: [Techniek & internet](https://1001vragen.nl/onderwerp/techniek-en-internet)
Toegevoegd: 2026-01-26
Webpagina: https://1001vragen.nl/vraag/how-to-use-concat-in-select-statement

## How do you concatenate two SELECT statements in SQL?

The UNION operator is used to combine the result-set of two or more SELECT statements. The UNION operator automatically removes duplicate rows from the result set. Requirements for UNION : Every SELECT statement within UNION must have the same number of columns.

Bron: [SQL UNION Operator - W3Schools](https://www.w3schools.com/sql/sql_union.asp#:~:text=The%20UNION%20operator%20is%20used,the%20same%20number%20of%20columns)

## How to split string in SELECT query?

The Solution: Use STRING_SPLIT( ) No need to surround each individual piece in quotes. DECLARE @categories VARCHAR(MAX) = 'value1,value2,value3'; Then you can use the STRING_SPLIT() function to turn those values into a recordset/array. Once it's in that format, you can use it in your IN clause as criteria.

Bron: [Using STRING_SPLIT() for multiple values in a MS SQL Server query](https://stevesohcot.medium.com/using-string-split-for-multiple-values-in-a-ms-sql-server-query-10841ddebf6c#:~:text=The%20Solution%3A%20Use%20STRING_SPLIT(%20)&text=No%20need%20to%20surround%20each,your%20IN%20clause%20as%20criteria.)

## Verwante vragen

- [What will be the result of the following query: select concat first_name last_name as full_name from employees?](https://1001vragen.nl/vraag/what-will-be-the-result-of-the-following-query-select-concat-first-name-last-name-as-full-name-from-employees.md)
- [What is the concat keyword in SQL?](https://1001vragen.nl/vraag/what-is-the-concat-keyword-in-sql.md)
- [How to concat two names in SQL?](https://1001vragen.nl/vraag/how-to-concat-two-names-in-sql.md)
- [How to concat two variables in SQL?](https://1001vragen.nl/vraag/how-to-concat-two-variables-in-sql.md)
- [How to concat special characters in SQL?](https://1001vragen.nl/vraag/how-to-concat-special-characters-in-sql.md)
- [How to use concat in select query?](https://1001vragen.nl/vraag/how-to-use-concat-in-select-query.md)
- [What is the default value of Group_concat_max_len?](https://1001vragen.nl/vraag/what-is-the-default-value-of-group-concat-max-len.md)
- [What is the separator of Group_concat in MySQL?](https://1001vragen.nl/vraag/what-is-the-separator-of-group-concat-in-mysql.md)
- [What is the maximum length of Group_concat in MySQL?](https://1001vragen.nl/vraag/what-is-the-maximum-length-of-group-concat-in-mysql.md)
- [What is a concat operator?](https://1001vragen.nl/vraag/what-is-a-concat-operator.md)
