Query all sequences in Oracle

Source: Internet
Author: User

Query all sequences in Oracle:

Note:

1. You must log on as an administrator;

2. sequence_owner must be in upper case, regardless of whether your user name is in upper case. Only uppercase letters can be recognized.

  1. -- View All sequences of current users
  2. Select SEQUENCE_OWNER, SEQUENCE_NAME from dba_sequences where sequence_owner = 'username ';
  3. -- Query the total number of user Sequences
  4. Select count (*) from dba_sequences where sequence_owner = 'username ';
  5. -- Example:
  6. Select SEQUENCE_OWNER, SEQUENCE_NAME from dba_sequences
  7. Where sequence_owner = 'wgb;
  8. Select count (*) from dba_sequences where sequence_owner = 'wg ';
  9. SQL> select SEQUENCE_OWNER, SEQUENCE_NAME from dba_sequences
  10. 2 where sequence_owner = 'wg ';
  11. SEQUENCE_OWNER SEQUENCE_NAME
  12. ------------------------------------------------------------
  13. WGB SEQ_FOR_TEST
  14. WGB SEQ_WGB_ADMIN
  15. WGB SEQ_WGB_COMMON
  16. WGB SEQ_WGB_COMMONS
  17. WGB SEQ_WGB_CONTACTOR
  18. WGB SEQ_WGB_FACES
  19. WGB SEQ_WGB_MEMBER
  20. WGB SEQ_WGB_MESSAGE
  21. WGB SEQ_WGB_MONEY_USER
  22. Nine rows have been selected.
  23. SQL> select count (*) from dba_sequences where sequence_owner = 'wg ';
  24. COUNT (*)
  25. ----------
  26. 9

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.