SQLServer String Functions
In (standard ANSI/ISO) SQL, the operator for string concatenation is ||. This syntax is supported by all major databases except SQL Server:
Many databases support a CONCAT function to join strings:
Some databases support using CONCAT to join more than two strings (Oracle does not):
In some databases, non-string types must be cast or converted:
Some databases (e.g., Oracle) perform implicit lossless conversions. For example, a CONCAT on a CLOB and NCLOB yields a NCLOB. A CONCAT on a number and a varchar2 results in a varchar2, etc.:
Some databases can use the non-standard + operator (but in most, + works only for numbers):
On SQL Server < 2012, where CONCAT is not supported, + is the only way to join strings.