当前位置:网站首页>mysql的concat()函数如何用
mysql的concat()函数如何用
2022-06-22 13:59:00 【亿速云】
mysql的concat()函数如何用
这篇文章主要介绍了mysql的concat()函数如何用的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇mysql的concat()函数如何用文章都会有所收获,下面我们一起来看看吧。
在mysql中,concat()函数用于将两个或多个字符串拼接成一个字符串并返回,语法为“CONCAT(string1,string2, ... );”;该函数需要至少一个参数,否则会引起错误。concat()函数在拼接之前会将所有参数转换为字符串类型;如果任何参数为NULL,则CONCAT()函数返回NULL值。

本教程操作环境:windows7系统、mysql8版本、Dell G3电脑。
mysql concat()函数
用法:拼接字符串
concat()函数会将两个或多个字符串拼接成一个字符串并返回。
CONCAT()函数需要至少一个参数,否则会引起错误。
CONCAT()函数的语法。
CONCAT(string1,string2, ... );
CONCAT()函数在连接之前将所有参数转换为字符串类型。如果任何参数为NULL,则CONCAT()函数返回NULL值。
示例:拼接两个字符串MySQL和CONCAT
SELECT CONCAT('MySQL','CONCAT');
如果添加NULL值,则CONCAT函数将返回一个NULL值,如下所示:
SELECT CONCAT('MySQL',NULL,'CONCAT');
关于“mysql的concat()函数如何用”这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对“mysql的concat()函数如何用”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注亿速云行业资讯频道。
边栏推荐
- Sword finger offer46 -- translate numbers into strings
- "Forget to learn again" shell process control - 38. Introduction to while loop and until loop
- Introduction to groovy syntax
- Flutter video Le lecteur écoute et joue automatiquement la prochaine chanson
- NF-ResNet:去掉BN归一化,值得细读的网络信号分析 | ICLR 2021
- ML笔记-matrix fundamental, Gradient Descent
- Front and back management system of dessert beverage store based on SSM framework dessert mall cake store [source code + database]
- Biden signe deux nouvelles lois visant à renforcer la cybersécurité du Gouvernement
- 山东泰安“6·21”燃气爆炸事故后续:全面排查整治餐饮场所燃气安全隐患
- Support vector machine for machine learning
猜你喜欢

本周四晚19:00战码先锋第7期直播丨三方应用开发者如何为开源做贡献

Phpstudy 2016 build Pikachu range

Using virtual serial port to debug serial port in keil MDK

What happened to those who didn't go to college

keil MDK 中使用虚拟串口调试串口

封装api时候token的处理

Data collection: skillfully using Bloom filter to extract data summary

Keil simulation and VSPD

PowerPoint tutorial, how to add watermarks in PowerPoint?

数据采集之:巧用布隆过滤器提取数据摘要
随机推荐
曾经,我同时兼职5份工作,只为给女友买个新款耳环......
Zhongshanshan: engineers after being blasted will take off | ONEFLOW u
Charles 乱码问题解决
极致效率,云原生数据库TDSQL-C安身立命的根本
UE4 通过蓝图获取本地文件
我靠副业一年全款买房:那个你看不起的行业,未来十年很赚钱!
一篇博客让你了解Material Design的使用
Random forest of machine learning
【Pr】基础流程
Those confusing user state & kernel state
网站存在的价值是什么?为什么要搭建独立站
No wonder the postgraduate entrance examination is so hot. These are the "hidden benefits" of Postgraduates!
ROS2前置基础教程 | 使用CMakeLists.txt编译ROS2节点
Method of using inout signal in Verilog
[Software Engineering] design module
RealNetworks vs. Microsoft: the battle in the early streaming media industry
Groovy之闭包
Struggle, programmer -- Chapter 48 A thousand gold coins are bought like Fu. Who can complain about this situation
世界上所有的知名网络平台
[graduation project] Research on emotion analysis based on semi supervised learning and integrated learning