# How to concat first three characters in SQL?

- 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)

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

## How to get the first 3 characters of a string?

The substr() method is another option for extracting parts of a string. It allows you to specify the starting index and the length of the substring you want to extract. substr(0, 3) starts at index 0 and extracts 3 characters from the string.

Bron: [JavaScript - How to Get the First Three Characters of a String?](https://www.geeksforgeeks.org/javascript/how-to-get-the-first-three-characters-of-a-string-using-javascript/#:~:text=The%20substr()%20method%20is,substring%20you%20want%20to%20extract.&text=substr(0%2C%203)%20starts,3%20characters%20from%20the%20string.)

## How to get the first 5 characters of a string in SQL?

- The SUBSTRING() function is a versatile tool for extracting a portion of a string. ...
- Another function we can use to accomplish the same task is LEFT(). ...
- When working with real-world data, we often encounter null values.

Bron: [Extracting the First N Characters of a Value in SQL](https://www.baeldung.com/sql/extract-first-n-characters)

## Verwante vragen

- [How to concat special characters in SQL?](https://1001vragen.nl/vraag/how-to-concat-special-characters-in-sql.md)
- [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)
- [How to concatenate three strings?](https://1001vragen.nl/vraag/how-to-concatenate-three-strings.md)
- [What are the three types of PL/SQL statements?](https://1001vragen.nl/vraag/what-are-the-three-types-of-pl-sql-statements.md)
- [What are three synonyms for expanded?](https://1001vragen.nl/vraag/what-are-three-synonyms-for-expanded.md)
- [How to convert character to numeric in SQL?](https://1001vragen.nl/vraag/how-to-convert-character-to-numeric-in-sql.md)
- [What character is this ã?](https://1001vragen.nl/vraag/what-character-is-this-a.md)
- [Which functions can be used to manipulate character number and date column values?](https://1001vragen.nl/vraag/which-functions-can-be-used-to-manipulate-character-number-and-date-column-values.md)
- [Which clause is used to find a pattern in character data?](https://1001vragen.nl/vraag/which-clause-is-used-to-find-a-pattern-in-character-data.md)
- [How to remove last 4 characters in Oracle SQL?](https://1001vragen.nl/vraag/how-to-remove-last-4-characters-in-oracle-sql.md)
