How to view the creation time of a sequence in Oracle?

In Oracle database, it is not directly possible to view the creation time of a sequence. However, the creation time of a sequence can be obtained by querying the relevant metadata views in the database. Here are two methods:

  1. Use the following query statement to view the creation time of the sequence:
SELECT created
FROM user_objects
WHERE object_name = 'YOUR_SEQUENCE_NAME' AND object_type = 'SEQUENCE';

Please replace “YOUR_SEQUENCE_NAME” with the name of the sequence you want to query.

  1. Use the following query to view the creation time of the sequence and include more detailed information:
SELECT object_name, created, last_ddl_time
FROM user_objects
WHERE object_type = 'SEQUENCE';

This will list the creation time and last modification time of all sequences in the database.

Please note that the above query only applies to sequences under the current user. If you need to view the creation time of sequences for other users, you can use the “all_objects” or “dba_objects” view and adjust the query criteria as needed.

Leave a Reply 0

Your email address will not be published. Required fields are marked *