How to Display all views on oracle database?
How to Display all views on oracle database?
241
17-Jul-2023
Aryan Kumar
18-Jul-2023Sure, here is how you can display all views on Oracle database:
SQL
This query will select all views in the current user's schema. The
user_views
view is a data dictionary view that contains information about all of the views in the schema.The
view_name
column contains the name of the view.To run this query, you will need to connect to the Oracle database using a tool like SQLPlus. Once you are connected, you can run the query by typing it into the SQLPlus prompt.
For example, to run the query above, you would type the following into the SQL*Plus prompt:
SQL
This would return a list of all views in the current user's schema.
You can also use the
all_views
view to list all views in the database, including views that are owned by other users.Here is the syntax for the
all_views
view:SQL
To run this query, you will need to have the
DBA
role or be granted theSELECT
privilege on theall_views
view.