在SQL数据库中,我可以获得序列的增量值:
select increment from sys.sequences where name = 'XXX';
有没有办法对Oracle数据库中的序列执行此操作?
答案 0 :(得分:4)
Oracle中的相应表格为all_sequences
(请参阅here):
select increment_by
from all_sequences
where sequence_name = 'XXX'
and sequence_owner = 'SCHEMANAME';
答案 1 :(得分:3)
select increment_by from user_sequences where sequence_name = 'XXX'
根据您登录的用户以及序列所在的架构,您可能需要查询dba_sequences或all_sequences。