Oracle查询所有序列
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle查询所有序列相关的知识,希望对你有一定的参考价值。
注意事项:- 必须以管理员身份登录;
- sequence_owner必须为大写,不管你的用户名是否大写。只有大写才能识别。
--查看当前用户的所有序列
select SEQUENCE_OWNER,SEQUENCE_NAME from dba_sequences where sequence_owner=‘用户名‘;
--查询当前用户的序列总数
select count(*) from dba_sequences where sequence_owner=‘用户名‘;
--示例:
select SEQUENCE_OWNER,SEQUENCE_NAME from dba_sequences where sequence_owner=’WGB;
select count(*) from dba_sequences where sequence_owner=’ WGB’;
SQL> select SEQUENCE_OWNER,SEQUENCE_NAME from dba_sequences where sequence_owner=‘CHES‘;
SEQUENCE_OWNER SEQUENCE_NAME
-------------------- ---------------------------
CHES CHE_PACKAGE_SEQ
CHES CHE_PART_SEQ
CHES CHE_SCHEDULE_SEQ
CHES CHE_TYPE_SEQ
SQL> select count(*) from dba_sequences where sequence_owner=‘CHES‘;
COUNT(*)
----------
4
以上是关于Oracle查询所有序列的主要内容,如果未能解决你的问题,请参考以下文章