当前位置:网站首页>[SQL] sql32 sets the last of all employees in the employees table_ Name and first_ Name splicing
[SQL] sql32 sets the last of all employees in the employees table_ Name and first_ Name splicing
2022-04-21 21:05:00 【A research monk who doesn't like research】
subject :
Existing employee table employees as follows :
| emp_no | birth_date | first_name | last_name | gender | hire_date |
| 10001 | 1953-09-02 | Georgi | Facello | M | 1986-06-26 |
| 10002 | 1964-06-02 | Bezalel | Simmel | F | 1985-11-21 |
| 10003 | 1959-12-03 | Parto | Bamford | M | 1986-08-28 |
| 10004 | 1954-05-01 | Chirstian | Koblick | M | 1986-12-01 |
| 10005 | 1955-01-21 | Kyoichi | Maliniak | M | 1989-09-12 |
| 10006 | 1953-04-20 | Anneke | Preusig | F | 1989-06-02 |
| 10007 | 1957-05-23 | Tzvetan | Zielinski | F | 1989-02-10 |
| 10008 | 1958-02-19 | Saniya | Kalloufi | M | 1994-09-15 |
| 10009 | 1952-04-19 | Sumant | Peac | F | 1985-02-18 |
| 10010 | 1963-06-01 | Duangkaew | Piveteau | F | 1989-08-24 |
| 10011 | 1953-11-07 | Mary | Sluis | F | 1990-01-22 |
Please put employees Table for all employees last_name and first_name Spliced together as Name, Use a space in the middle to distinguish .
( notes :sqllite, String concatenation as || Symbol , I won't support it concat function ,mysql Support concat function ).
Input description :
nothing
Output description :
| Name |
|---|
| Facello Georgi |
| Simmel Bezalel |
| Bamford Parto |
| Koblick Chirstian |
| Maliniak Kyoichi |
| Preusig Anneke |
| Zielinski Tzvetan |
| Kalloufi Saniya |
| Peac Sumant |
| Piveteau Duangkaew |
| Sluis Mary |
Answer key :
Use concat function , You can splice multiple fields
1.concat function :
-
effect : Take multiple results as character string Splice together
-
grammar :
CONCAT(str1,str2...)
2. concat_ws function
-
effect : Splice multiple results together , Use the specified separator
-
grammar :
CONCAT_WS(separator,str1,str2,...)
select
concat(last_name, ' ', first_name)
from
employees
版权声明
本文为[A research monk who doesn't like research]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204212059008620.html
边栏推荐
- 滑环技术在机器运行中的重要性
- The annual salary is 170W. Alibaba P8 blind date requires the woman's monthly salary of 10000. Netizen: it's a little high
- 1、MySQL Workbench 8.0安装
- Others - zerorpc and simplexmlrpserver
- 项目管理系统开发成功案例
- 其它——Siege压力测试工具使用
- Manuel d'utilisation et de développement de la plate - forme de connexion unique pour l'amarrage du système d'AP de Tongda
- 《动手学机器人学》7.4机器人运动学介绍|机械臂运动学|两轮差速底盘运动学|轮式里程计
- HMS Core 6.4.0版本发布公告
- [embedded] about IAP + XMODEM receiving bin file from outside to upgrade the chip
猜你喜欢

培训管理系统操作说明

工作流 流程设置 定制开发

TGIP-CN 038 报名|深度解析 Apache Pulsar 源码阅读正确姿势(一)

档案管理系统操作说明

滑环技术在机器运行中的重要性

【嵌入式】关于IAP+Xmodem从外部接收bin文件对芯片进行升级学习记录

《动手学机器人学》7.4机器人运动学介绍|机械臂运动学|两轮差速底盘运动学|轮式里程计

Tips for using win10 close user tips before software installation

Module-3: Outsourcing student management system architecture design document

通达oa工作流升级 操作说明
随机推荐
Operation instructions for upgrading Tongda OA workflow
其它——ZeroRPC和SimpleXMLRPCServer
10.2注意力汇聚
10.2 concentration
OA表单设计 案例展示
其它——MyCat实现分库分表
【无标题】测试的时间按均分121
其它-Supervisor的使用
Autres - - analyse de la cohérence en double écriture entre redis et MySQL
avformat_new_stream理解
Weekly report from April 11, 2022 to April 17, 2022
SQL error: ora-01428: parameter '0' is out of range 00000 - “argument ‘%s‘ is out of range“
2022-04-21:给定一个包含 [0,n) 中不重复整数的黑名单 blacklist,写一个函数从 [0, n) 中返回一个不在 blacklist 中的随机整数
通达oa工作流升级 操作说明
项目管理系统开发成功案例
Unity3d C#利用材质(Material)贴图的偏移实现2D游戏单背景图无限移动背景效果功能(含源码)
《动手学机器人学》7.3.1齐次坐标变换&&齐次变换矩阵
如何正确有效的进行滑环的安装
Importance of slip ring technology in machine operation
AttributeError: ‘list‘ object has no attribute ‘endswich‘