题目描述
将employees表中的所有员工的last_name和first_name通过(')连接起来。
CREATE TABLE `employees` (
`emp_no` int(11) NOT NULL,
`birth_date` date NOT NULL,
`first_name` varchar(14) NOT NULL,
`last_name` varchar(16) NOT NULL,
`gender` char(1) NOT NULL,
`hire_date` date NOT NULL,
PRIMARY KEY (`emp_no`));
输出格式:
CREATE TABLE `employees` (
`emp_no` int(11) NOT NULL,
`birth_date` date NOT NULL,
`first_name` varchar(14) NOT NULL,
`last_name` varchar(16) NOT NULL,
`gender` char(1) NOT NULL,
`hire_date` date NOT NULL,
PRIMARY KEY (`emp_no`));
输出格式:
name |
---|
Facello'Georgi |
Simmel'Bezalel |
Bamford'Parto |
Koblick'Chirstian |
Maliniak'Kyoichi |
Preusig'Anneke |
Zielinski'Tzvetan |
Kalloufi'Saniya |
Peac'Sumant |
Piveteau'Duangkaew |
Sluis'Mary |
SQL:
select last_name||"'"||first_name as name from employees
||用来连接字符串