シーケンス定義を確認する

Pocket

【概要】
DBA_SEQUENCESにより、シーケンス定義を確認する。
【SQL文】
/*
|| ■シーケンス定義を確認する
||
|| 【項目の説明】
|| sequence_owner :順序の所有者
|| sequence_name :順序名
|| min_value :順序の最小値
|| max_value :順序の最大値
|| increment_by :順序が増やされるときの増分値
|| cycle :限度に達したときに、順序の繰返しを実行するかどうか(Y | N)
|| cache_siz :キャッシュする順序番号の数
*/
set lines 200
set pages 1000

clear col
ttitle off

col sequence_owner for a20
col sequence_name for a30
col min_value for a15
col max_value for a30
col increment_by for a20
col cycle for a10
col cache_siz for a30

ttitle left ‘■■■ シーケンス定義情報 ■■■’
spool seq_info.lis

SELECT sequence_owner
. sequence_name
. min_value
. max_value
, increment_by
, DECODE(cycle_flag,’Y’,’Yes’,’No’) cycle
, cache_size
FROM sys.dba_sequences
;
spool off
clear col
ttitle off
set line 80

以上です (^^♪