mysql concat function

MySQL CONCAT function is used to concatenate two strings to form a single string.

Description:

MySQL CONCAT() function is used to add two or more strings.

  • There may be one or more arguments.
  • Returns the string that results from concatenating the arguments.
  • Returns a non binary string, if all arguments are non binary strings.
  • Returns a binary string, if the arguments include any binary strings.
  • If the argument is numeric, it is converted to its equivalent non binary string form.
  • Returns NULL if any argument is NULL.

Example:

mysql> SELECT CONCAT(‘SATYA ‘, ‘PRAKASH’);
+—————————-+
| SATYA PRAKASH |
+—————————-+
1 row in set (0.00 sec)


mysql> SELECT CONCAT(‘satya’,’.’,’prakash’);
+——————————–+
| satya.prakash |
+——————————–+
1 row in set (0.00 sec)

 

Satya Prakash

VOIP Expert: More than 8 years of experience in Asterisk Development and Call Center operation Management. Unique Combination of Skill Set as IT, Analytics and operation management.

Leave a Reply