What MySQL CONCAT() function returns by passing the numeric arguments?



MySQL allows us to pass numeric arguments to CONCAT() function. It can be passed without using the quotes.

Example

mysql> Select Concat(10,20);

+---------------+
| Concat(10,20) |
+---------------+
| 1020          |
+---------------+

1 row in set (0.00 sec)

Even we can pass one character string argument and one numeric argument to CONCAT() function as follows −

mysql> Select CONCAT('DELHI ', 110006)AS 'City PIN CODE';

+----------------+
| City PIN CODE  |
+----------------+
| DELHI 110006   |
+----------------+

1 row in set (0.00 sec)

Advertisements