xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

SQL CONCAT All In One

SQL CONCAT All In One

select CONCAT(firstname, ' ', lastname) as fullname, (salary *  12 + experience *  500) as total from staff ORDER BY total;

/* 


-- select firstname, lastname as fullname from staff

-- select (firstname,lastname) as fullname from staff ORDER BY total;

-- total experience * 500



 */


CONCAT

-- CONCAT(s1, s2, ..., sn)	字符串 s1, s2, ...,, sn 等多个字符串合并为一个字符串	

-- 合并多个字符串

SELECT CONCAT("MySQL", "  ", "is Awesome!") AS ConcatenatedString;

https://www.w3schools.com/sql/func_mysql_concat.asp

https://www.runoob.com/mysql/mysql-functions.html

https://www.runoob.com/sql/sql-alias.html

refs



©xgqfrms 2012-2025

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @   xgqfrms  阅读(30)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
历史上的今天:
2021-09-19 Flutter Widgets Refresh Indicator
2021-09-19 React Native Tutorial (2021) All In One
2021-09-19 StackOverflow sites All In One
2020-09-19 iPadOS 14 memoji 无法使用 bug
2020-09-19 Twitter 分享 API All In One
2020-09-19 如何配置 webpack 支持 preload, prefetch, dns-prefetch
2019-09-19 TypeScript & Advanced Types
点击右上角即可分享
微信分享提示