what is the error in the following mysql statement :
mysql> SELECT columnName FROM tableName WHERE columnName LIKE '%' + @variableName + '%';
what is the error in the following mysql statement :
mysql> SELECT columnName FROM tableName WHERE columnName LIKE '%' + @variableName + '%';
You can not concat strings using "+" symbol.
SELECT columnName
FROM tableName
WHERE columnName LIKE CONCAT('%',@variableName,'%');
or
SELECT columnName FROM tableName WHERE columnName LIKE '%@variableName%';