当前位置:网站首页>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()函数如何用”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注亿速云行业资讯频道。
边栏推荐
- FreeRTOS task priority and interrupt priority
- Simulation Keil et vspd
- Charles 乱码问题解决
- Sikulix选取相对位置的图片(进阶版)
- KEIL仿真和vspd
- Good wind relies on strength – code conversion practice of accelerating SQL Server Migration with babelfish
- 直播出海 | 国内直播间再出爆品,「外卷」全球如何致胜
- [Software Engineering] planning and project management
- 我靠副业一年全款买房:那个你看不起的行业,未来十年很赚钱!
- 【直播回顾】战码先锋第六期:共建测试子系统,赋能开发者提
猜你喜欢

2022年失业的人多吗?今年是不是特别难找工作?

嵌入式中的强符号和弱符号是什么?
![[graduation project] Research on emotion analysis based on semi supervised learning and integrated learning](/img/02/33d7b6a5bc01737c5dbeb944202a66.jpg)
[graduation project] Research on emotion analysis based on semi supervised learning and integrated learning

C language student management system (open source)

Those confusing user state & kernel state

封装api时候token的处理

Using pictures to locate app elements sikulix

Once, I had 5 part-time jobs just to buy a new earring for my girlfriend

直播出海 | 国内直播间再出爆品,「外卷」全球如何致胜

利用图片实现APP元素定位sikulix
随机推荐
What does password security mean? What are the password security standard clauses in the ISO 2.0 policy?
拜登簽署兩項旨在加强政府網絡安全的新法案
Redistemplate serialization
Using pictures to locate app elements sikulix
What is the value of a website? Why build an independent station
Fight, programmer -- Chapter 42 will draw a bow like a full moon, look northwest and shoot Sirius
What are the five characteristics of network security? What are the five attributes?
New hybrid architecture iformer! Flexible migration of convolution and maximum pooling to transformer
Detailed explanation of CSAPP Labs
谷歌竞价账户可以探测到全球市场吗?
UE4 通过蓝图获取本地文件
Struggle, programmer -- Chapter 47 the so-called Iraqis are on the water side
flutter video_player实现监听和自动播放下一首歌曲
ROS2前置基础教程 | 小鱼教你用CMake依赖查找流程
Is the encryption market a "natural disaster" or a "man-made disaster" in the cold winter?
Software architecture
After 17 years, Liu Yifei became popular again: ordinary people don't want to be eliminated, but they also need to understand this
那些令人懵逼的用户态&内核态
那些没考上大学的人,后来过的怎样
数据采集之:巧用布隆过滤器提取数据摘要