SQL Server 2012: The Amazing CONCAT function for string concatenation

The SQL Server 2012 has introduced the new CONCAT function to the concatenation of the string and integer value.

Previously, we were doing concatenation using ‘+’ operator and using COALESCE().
But this newly introduced CONCAT() is faster than any other approach for the concatenation techniques.

The syntax of CONCAT():

Different example of CONCAT():

CONCAT string values:

CONCAT integer values:

CONCAT decimal values:

CONCAT with NULL:

Invalid CONCAT parameters:

Anvesh Patel

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz