Home >Database >Mysql Tutorial >How to implement string concatenation in MySQL

How to implement string concatenation in MySQL

王林
王林forward
2023-06-01 11:22:063302browse

String connection

Command: concat(str,str2,str3)

Function: splicing strings

Application scenario: splicing characters String, for example, adding a specified string to some fields.

Example:

mysql> select concat("andy","qian");
+-----------------------+
| concat("andy","qian") |
+-----------------------+
| andyqian  |
+-----------------------+
1 row in set (0.00 sec)

This function is usually used more often. The basic scenario is to add a specific string to certain data. Methods as below:

How to implement string concatenation in MySQL

The above is the detailed content of How to implement string concatenation in MySQL. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete