查询某一用户下的序列,其中user_name是你当前数据库的登录名
SQL> select SEQUENCE_OWNER,SEQUENCE_NAME from dba_sequences where sequence_owner=‘user_name‘;
SEQUENCE_OWNER SEQUENCE_NAME
-------------------- ----------------------------------------------------------------------
C##SCOTT DEPT_SEQ
C##SCOTT EMP_SEQ
C##SCOTT HIBERNATE_SEQUENCE
C##SCOTT STU2_SEQ
C##SCOTT STUCOURSE_SEQ
C##SCOTT STU_SEQ
已选择 6 行。
也可以直接使用聚合函数计算
SQL> select COUNT(*) from dba_sequences where sequence_owner=‘user_name‘;
COUNT(*)
----------
6
时间: 2024-10-13 04:57:15