Oracle SQL *Plus有一個非常有用的子參數(subparameter)
用過使用NEW_VALUE參數
保存SQL *Plus變量並在其中填充Oracle數據是非常重要的特性
collog_mode_valnew_valuelog_modenoprint
select
value log_mode
from
v$parameter
where
name =
select
column today new_value today;
select
to_char(sysdate
from
dual;
現在
在這個例子中
(num_rows*avg_row_len)
(blocks*&blksz)
這是整個查詢
column c
column c
column c
column c
column c
column c
column c
column db_block_sizenew_valueblksznoprint
select value db_block_size from v$parameter where name =
set pages
set lines
spool tab_rpt
select
table_name c
b
b
num_rows c
num_rows*avg_row_len c
blocks*&blksz c
((num_rows*avg_row_len)/(blocks*&blksz))*
from
perfstat
dba_segments b
where
b
and
to_char(snap_time
(select max(to_char(snap_time
and
avg_row_len >
order by c
;
From:http://tw.wingwit.com/Article/program/Oracle/201311/17435.html