首页 > 数据库 >SQL226 将employees表的所有员工的last_name和first_name拼接起来

SQL226 将employees表的所有员工的last_name和first_name拼接起来

时间:2023-01-10 14:58:30浏览次数:38  
标签:last name employees 拼接 SQL226 first

SQL226 将employees表的所有员工的last_name和first_name拼接起来

题目描述

现有员工表employees
请将employees表的所有员工的last_name和first_name拼接起来作为Name,中间以一个空格区分。

方法

对于concat函数    
语法为:
  concat(str1, str2,...)

代码

select CONCAT(last_name, ' ', first_name) Name from employees;

标签:last,name,employees,拼接,SQL226,first
From: https://www.cnblogs.com/loongnuts/p/17040274.html

相关文章