Replace, concat, and cast character string functions in mysql need to export a personal information of job-seeking users. This information requires three-table joint query requirements: birthdate format: 1990.01.02 Database: Gender display: men and
one, CONCAT () functionThe CONCAT () function is used to concatenate multiple strings into a single string. Using data table info as an example, where select Id,name from Info LIMIT 1, the return result is +----+--------+| ID | Name |+----+--------+
An example of CONCAT (string concatenation function) and GROUP_CONCAT
CONCAT
Sometimes, we need to link the data obtained from different columns. Each database provides methods to achieve this purpose:MySQL: CONCAT ()
Oracle: CONCAT (), |
SQL
One, CONCAT () functionThe CONCAT () function is used to concatenate multiple strings into a single string.Use data table info as an example, where select Id,name from Info LIMIT 1, and the returned result is+----+--------+| ID | name |+----+--------
Select Concat_ws ("_", Name,password) as name from ' user ';Select Group_concat (Name, ":", password) as name from ' user ';One, CONCAT () functionThe CONCAT () function is used to concatenate multiple strings into a single string.Use data table
One, CONCAT () functionThe CONCAT () function is used to concatenate multiple strings into a single string.Use data table info as an example, where select Id,name from Info LIMIT 1, and the returned result is+----+--------+| ID | name |+----+--------
One, CONCAT () functionThe CONCAT () function is used to concatenate multiple strings into a single string.Use data table info as an example, where select Id,name from Info LIMIT 1, and the returned result is+----+--------+| ID | name |+----+--------
One, CONCAT () functionThe CONCAT () function is used to concatenate multiple strings into a single string.Use data table info as an example, where select Id,name from Info LIMIT 1, and the returned result is+----+--------+| ID | name |+----+--------
One, CONCAT () functionThe CONCAT () function is used to concatenate multiple strings into a single string.Use data table info as an example, where select Id,name from Info LIMIT 1, and the returned result is+----+--------+| ID | name |+----+--------
One, CONCAT () functionThe CONCAT () function is used to concatenate multiple strings into a single string.Use data table info as an example, where select Id,name from Info LIMIT 1, and the returned result is+----+--------+| ID | name |+----+--------
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.