How do you query all views in Oracle?

You can use the following SQL statement in the Oracle database to query all views:

SELECT * 
FROM USER_VIEWS;

This will return all views under the current user. If you want to query views created by all users, you can use the following SQL statement:

SELECT * 
FROM ALL_VIEWS;

To retrieve all views from the database, you can use the following SQL statement:

SELECT * 
FROM DBA_VIEWS;

Please note that you need DBA privileges to query DBA_VIEWS.

Leave a Reply 0

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


广告
Closing in 10 seconds
bannerAds