MySQL string processing function -- concat () function

Source: Internet
Author: User
Tags mysql delete

MySQL string processing function concat () is used to connect one or more strings. It is one of the most important MySQL string processing functions. The following describes how to use this MySQL string processing function in detail.

The concat function of MySQL can connect one or more strings, such

 
 
  1. mysql> select concat('10');  
  2. +--------------+  
  3. | concat('10') |  
  4. +--------------+  
  5. | 10   |  
  6. +--------------+  
  7. 1 row in set (0.00 sec)  
  8.  
  9. mysql> select concat('11','22','33');  
  10. +------------------------+  
  11. | concat('11','22','33') |  
  12. +------------------------+  
  13. | 112233 |  
  14. +------------------------+  
  15.  
  16. 1 row in set (0.00 sec)  

When the MySQL concat MySQL string processing function is connected to a string, if one of them is NULL, NULL is returned.

 
 
  1. mysql> select concat('11','22',null);  
  2. +------------------------+  
  3. | concat('11','22',null) |  
  4. +------------------------+  
  5. | NULL   |  
  6. +------------------------+  
  7. 1 row in set (0.00 sec)  

How to view the three MySQL character sets

How to modify the default Character Set of mysql

How does MySQL Delete foreign key definitions?

MySql stored procedure with Parameters

MySQL statements commonly used in PHP

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.