In MS SQL Server the CONCAT function is introduced in MS SQL Server 2012
edition only. In the prrior versions we have to use + operator to join
strings.
Here is the syntax of MSSQL CONCAT function
Example:
Select concat('This ','is ','Testing');Using + operator
select 'This ' + 'is '+'Testing';
The equivalent function in MySQL is available with exact name i.e. CONCAT. Further more, MySQL also provides an extended function called CONCAT_WS. The CONCAT_WS function joins string with a separtor character.
Here are the examples
Select concat('This ','is ','Testing');
CONCAT_WS function concatenates strings with separator in between. The first argument is the separator for the rest of the arguments. The separator is added between the strings to be concatenated.
Syntax
CONCAT_WS(separator,str1,str2,...)Example
mysql>select concat(' ','This','is','Testing');
Back to Converting Functions from MSSQL to MySQL
The MSSQL to MySQL converter will automatically convert the MSSQL functions to it's equivalent in MySQL while converting veiws.