55

Is there a way to display all the views currently set on an oracle database via sql developer?

Thanks.

GrumP
  • 1,183
  • 6
  • 19
  • 43
  • [This answer](http://stackoverflow.com/questions/2247310/how-do-i-list-all-tables-in-a-schema-in-oracle-sql) may help. – Al Rodgers Dec 06 '12 at 11:39

3 Answers3

104

for all views (you need dba privileges for this query)

select view_name from dba_views

for all accessible views (accessible by logged user)

select view_name from all_views

for views owned by logged user

select view_name from user_views
Petr Pribyl
  • 3,425
  • 1
  • 20
  • 22
17

Open a new worksheet on the related instance (Alt-F10) and run the following query

SELECT view_name, owner
FROM sys.all_views 
ORDER BY owner, view_name
GuZzie
  • 974
  • 1
  • 6
  • 23
  • This is true only for your own views plus all views in other schemas which are granted to you either via role or directly. Depending on what has been granted, it may be just a subset of "all". So, the question is, what does the author mean with "all views in database". – D. Lohrsträter May 20 '21 at 08:37
4
SELECT * 
FROM DBA_OBJECTS  
WHERE OBJECT_TYPE = 'VIEW'
  • 5
    Thank you for this code snippet, which might provide some limited, immediate help. A [proper explanation would greatly improve its long-term value](//meta.stackexchange.com/q/114762/350567) by showing *why* this is a good solution to the problem, and would make it more useful to future readers with other, similar questions. Please [edit] your answer to add some explanation, including the assumptions you've made. – iBug Jan 16 '18 at 14:59
  • 1
    Not every user has the privilege to select from DBA_views! – D. Lohrsträter May 20 '21 at 08:43