Oracle查詢序列

來源:互聯網
上載者:User

Oracle查詢序列

Oracle查詢某一使用者下的序列,其中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

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.