Result: 'TipsMake.com'
SELECT CONCAT('Quan', 'tri', 'mang', '.com');
Result: 'TipsMake.com'
SELECT CONCAT('Quan ', 'Tri ', 'Mang ');
Result: 'Quan Tri Mang'
When combining strings together, you can add whitespace characters to separate your linked values for easier reading.
SELECT CONCAT('Orange', ' ', 'Peach', ' ', 'Apple');
Result: 'Orange Peach Apple'
In this example, Quantrimang used the second and fourth parameters in the CONCAT function to add a space character between values Orange, Peach and Apple. This will help the strings not be tied together.
Previous article: CHARINDEX function in SQL Server
Next lesson: '+' operator in SQL Server