10 连接符 ||
select 'hello' || 'world' from emp;
select 'hello' || 'world' from dual; --伪表
dual是数据字典 (oracle超级管理员分配给普通用的资源....,tab关键字....)
SQL> select sysdate from dual;
SYSDATE
--------------
07-10月-14
SQL>
11:DISTINCT
A 作用去除重复的行
select DISTINCT deptno from emp;
DEPTNO
----------
30
20
10
B DISTINCT修饰多个字段的时, 当部门编号和工种都一样的时候,认为是重复的...
否则不同行.
====DISTINCT2个字段
selectDISTINCT deptno, job from emp