SQL> select last_name||'''s job_id is '||job_id
2 AS "Employees'id"
3 from employees;
结果如下:
Employees'id
------------------------------------------------
Abel's job_id is SA_REP
Ande's job_id is SA_REP
Atkinson's job_id is ST_CLERK
Austin's job_id is IT_PROG
Baer's job_id is PR_REP
Baida's job_id is PU_CLERK
Banda's job_id is SA_REP
Bates's job_id is SA_REP
Bell's job_id is SH_CLERK
Bernstein's job_id is SA_REP
Bissot's job_id is ST_CLERK
分析:
SQL语句中,两个单引号可以转意为一个单引号,两个双引号里面的那个单引号保留愿意。双竖线连接两个字段成为一个字段。
| 欢迎光临 重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛 (http://bbs.cqsztech.com/) | Powered by Discuz! X3.2 |