oracle別名如果別名包含空格
select ename
sal*
from emp;
列的別名可用於select和order by子句中
select ename||job as
from emp;
select ename||
as
select distinct deptno
from emp;
sqlplus [username[/password[@database]]]
在sql*plus中編輯sql緩沖區中的sql語句
SQL>select depno
sql>L
sql>A
sql>L
sql>/(執行)
select empno
from emp
where deptno=
oracle提供
除了
is null(是空值)
sql>select ename
from emp
where ename=
sql>select name
from emp
where ename=
所有字符檢索都是大小寫敏感的
顯示工資在
>select ename
from emp
where sal between
顯示
>select ename
from emp
where hiredate between
顯示mgr等於
>select empno
from emp
where mgr in (
顯示姓名為FORD
>select empno
from emp
where ename in(
like字形匹配操作可以使用通配符
>select ename
from emp
where ename like
escape標識
>select ename
from emp
where ename like
在條件中NOT
>select ename
from emp
where job not in (
not and or
>select ename
from emp
where job=
or job=
and sal>
第一個條件是工作為president並且月工資大於
第二個條件是工作為salesman
因此可以這樣理解
>select ename
from emp
where (job=
or job=
and sal>
第一個條件是工作為president或saleman
第二個條件是月工資大於
>select ename
from emp
order by hiredate;
From:http://tw.wingwit.com/Article/program/Oracle/201311/17302.html