# How to concatenate a SELECT statement?

Using CONCAT() With NULL Values in SQL SELECT id, CONCAT(first_name, ' ', last_name) AS full_name FROM employees; … and this data in the table… … the output will be this one. In other words, CONCAT() will concatenate and return whatever data it has, be it only the first or the last name.

Bron: [CONCAT() in SQL: Tips and Techniques for Efficient Queries](https://www.stratascratch.com/blog/concat-in-sql-tips-and-techniques-for-efficient-queries/#:~:text=Using%20CONCAT()%20With%20NULL%20Values%20in%20SQL&text=SELECT%20id%2C%20CONCAT(first_name%2C,first%20or%20the%20last%20name.)

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

## How to concatenate in SQL SELECT statement?

- ExampleGet your own SQL Server. Add two strings together: SELECT CONCAT('W3Schools', '.com'); ...
- Example. Add 3 strings together: SELECT CONCAT('SQL', ' is', ' fun!' ...
- Example. Add strings together (separate each string with a space character): SELECT CONCAT('SQL', ' ', 'is', ' ', 'fun!'

Bron: [SQL Server CONCAT() Function](https://www.w3schools.com/sql/func_sqlserver_concat.asp)

## Verwante vragen

- [How can you concatenate two strings in Python * using the concat() method using the join() method using the & operator using the operator?](https://1001vragen.nl/vraag/how-can-you-concatenate-two-strings-in-python-using-the-concat-method-using-the-join-method-using-the-operator-using-the-operator.md)
- [How to concatenate three strings?](https://1001vragen.nl/vraag/how-to-concatenate-three-strings.md)
- [How to concatenate two different data types in SQL?](https://1001vragen.nl/vraag/how-to-concatenate-two-different-data-types-in-sql.md)
- [Which operator can be used to concatenate strings?](https://1001vragen.nl/vraag/which-operator-can-be-used-to-concatenate-strings.md)
- [Which function is used to concatenate two or more strings?](https://1001vragen.nl/vraag/which-function-is-used-to-concatenate-two-or-more-strings.md)
- [Which operator is used to concatenate or join two or more settings?](https://1001vragen.nl/vraag/which-operator-is-used-to-concatenate-or-join-two-or-more-settings.md)
- [How to fix typeerror can only concatenate str not int to str?](https://1001vragen.nl/vraag/how-to-fix-typeerror-can-only-concatenate-str-not-int-to-str.md)
- [How to concatenate two strings?](https://1001vragen.nl/vraag/how-to-concatenate-two-strings.md)
- [How to CONCATENATE two string variables namely str1 and str2 in Java using another string variable var?](https://1001vragen.nl/vraag/how-to-concatenate-two-string-variables-namely-str1-and-str2-in-java-using-another-string-variable-var.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)
