尚学堂Oracle经验
注: 这是个人看Oracle视频时写下的笔记, 多有错误, 望各位切勿吝惜赐教.
1. Dos
下登陆超级管理员
:
sqlplus sys/
密码
as sysdba
2.
更改管理员
:
alter user scott account unlock;
3.
数据的备份
.
A
导出
:
Cmd
下
:
exp (
调用
Oracle
的程序
)
导出
B create user
create user JJ (
用户名
) identified by Jack (
密码
) default tablespace users quota
10M on users
授权
:
grant create session, create table, create view to JJ
3.
起别名:
select ename, sal*12
anuual_sal from emp;
--
为
sal*12
起别名:
anuual_sal
4.
任何含有空值
的表达式结果都为空
值;
对于空值的处理
:
select ename,
sal ,comm. from emp where comm. is null;(
选空值
)
select ename, sal ,comm. from emp where comm. is not
null;(
选非空值
)
让空值在运算中等于
0
:
select
ename, sal*12 + nvl(comm., 0) from emp;
--
若
comm
为空值,则
comm=0
5.
转换为字符串
:elect ename||sal from emp;
--
将
ename
与
sal
转换为字符串而其并在一起(结果如:
SMITH800
)
6.
单引号
表示字符串
'adkfjkda',
连续的两个单引号能表示为一个字符单引号;如
('abc''def'
其结果为:
abc'def
7.
去掉重复值
:
select
distinct deptno from emp;
去点组合后重复值:
select distinct deptno, job from
emp;
8. ”
不等于
”
不是
”
!
=&rdq
相关文档:
DSI是Data Server
Internals的缩写,是Oracle公司内部用来培训Oracle售后工程师使用的教材.由于某种原因流落江湖,
受到众多Oracle爱好者的追捧, 不过要是功力不到, 阅读反而无益. DSI3是Oracle 8系列的, DSI4是Oracle 9系列的.
这样的文档上通常都印着:Oracle Confidential:For internal Use Only.
DSI301 Advanced S ......
2010年05月2号 |
23:59分类:Linux&Unix
, 管理维护
| 编辑
| 标签:11g
、grid
本文出自 “inthirties(男
人三十)
”博客,转载请务必注明作者和保留出处。
11g里出现了一个新角色。
Oracle Grid Infrastructure
http://downlo ......
问题:请教HINT写法
我有一个SQL添加如下hint,目的是指定hash_join方式。
select /*+ordered use_hash(a,b,c,d) */ *
from a,b,c,d
Where ...
其中,
a只与b有关联关系,b只与c有关联关系,b只与c有关联关系,c只与d有关联关系,
数量级:a:1000条, b:100 万条, ......