CONCAT

The CONCAT function combines two compatible string arguments.

CONCAT-Syntax

Either argument can also be a numeric data type. The numeric argument is implicitly cast to a VARCHAR data type.

The result of the function is a string that consists of the first string followed by the second string.

The CONCAT function is identical to the CONCAT operator.

Example:

The following example combines strings available in the columns EMPL_NAME and DEPT from the table EMPLOYEE.


SELECT CONCAT(EMPL_NAME , ' ', DEPT) AS EMPL_DEPT FROM EMPLOYEE

The above example returns the following.


EMPL_DEPT
BUMRAH SALES
CEASAR MARKETING
ELICA CUST SUPR
DEV ADMIN
NEWTON DATA
SAMUEL IT