Oracle中的decode用法
Oracle中的decode用法
Decode(条件,值1,显示值1,值2,显示值2,…… 值n,显示值n)
应用举例:
select t.res_id,
t.res_size || '(kb)' as res_size,
decode(t.res_type,1,'模板区','0','文档区') res_type,
t.res_address,
t.createtime,
t.createuser
from t_cms_d_resource t
相关文档:
查看Oracle执行计划的几种方法
一、通过PL/SQL Dev工具
1、直接File->New->Explain Plan Window,在窗口中执行sql可以查看计划结果。其中,Cost表示cpu的消耗,单位为n%,Cardinality表示执行的行数,等价Rows。
2、先执行 EXPLAIN PLAN FOR select * from tab ......
oracle客户端 连接PL/SQL
下载客户端到某个路径
修改配置文件
D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
SQLCLUB =
(DESCRIPTION ......
数据字典dict总是属于Oracle用户sys的。
1、用户:
select username from dba_users;
改口令
alter user spgroup identified by spgtest;
2、表空间:
select * from dba_data_files;
select * from dba_tablespaces;//表空间
select tablespace_name,sum(bytes), sum ......
SVRMGR> select * from dba_jobs;
初始化相关参数job_queue_processes
alter system set job_queue_processes=39 scope=spfile;//最大值不能超过1000 ;job_queue_interval = 10 //调度作业刷新频率秒为单位
DBA_JOBS describes all jobs in the database.
USER_JOBS describes all jobs owned by the c ......