当前位置:网站首页>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()函数如何用”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注亿速云行业资讯频道。
边栏推荐
- Sikulix选取相对位置的图片(进阶版)
- PHP built-in protocols (supported and encapsulated protocols)
- 难怪考研热度这么高,这些是研究生才有的“隐藏福利”!
- Is the encryption market a "natural disaster" or a "man-made disaster" in the cold winter?
- PowerPoint 教程,如何在 PowerPoint 中添加水印?
- 极致效率,云原生数据库TDSQL-C安身立命的根本
- 轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
- At 19:00 this Thursday evening, the 7th live broadcast of battle code Pioneer - how third-party application developers contribute to open source
- We will resolutely fight and win the hard battle of flood control and disaster relief and spare no effort to ensure the safety of people's lives and property
- 擴散模型又殺瘋了!這一次被攻占的領域是...
猜你喜欢

【Pr】基础流程

I rely on the sideline to buy a house in full one year: the industry you despise will make a lot of money in the next ten years!

Live broadcast goes to sea | domestic live broadcast room produces explosive products again. How can "roll out" win the world

The diffusion model is crazy again! This time the occupied area is

本周四晚19:00战码先锋第7期直播丨三方应用开发者如何为开源做贡献
![[Software Engineering] planning and project management](/img/93/4b5b5034fbfb76adef1b4fe93a85cb.png)
[Software Engineering] planning and project management

Thoroughly understand the factory mode

Deadlock found when trying to get lock; Try restarting transaction

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

那些没考上大学的人,后来过的怎样
随机推荐
Go all out to implement the flood control and disaster relief measures in detail and in place, and resolutely protect the safety of people's lives and property
C # WinForm photo album function, picture zooming, dragging, preview Pagination
历时100天、小鱼搭建了个机器人交流社区!!现公开邀请版主中!
数据采集之:巧用布隆过滤器提取数据摘要
flutter video_ Player monitors and automatically plays the next song
RealNetworks vs. Microsoft: the battle in the early streaming media industry
[graduation project] Research on emotion analysis based on semi supervised learning and integrated learning
曾经,我同时兼职5份工作,只为给女友买个新款耳环......
Are there many unemployed people in 2022? Is it particularly difficult to find a job this year?
Random forest of machine learning
"Forget to learn again" shell process control - 38. Introduction to while loop and until loop
PHP built-in protocols (supported and encapsulated protocols)
Sikulix选取相对位置的图片(进阶版)
mysql如何将字段修改为not null
加密市场进入寒冬,是“天灾”还是“人祸”?
What are strong and weak symbols in embedded systems?
U++编程 数组学习笔记
轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
我靠副业一年全款买房:那个你看不起的行业,未来十年很赚钱!
Verilog使用inout信号的方法