Get all views : USER_VIEWS « System Tables Views « Oracle PL / SQL






Get all views

  
SQL>
SQL> set heading off
SQL> set feedback off
SQL> set linesize 1000
SQL> set trimspool on
SQL> set verify off
SQL> set termout off
SQL> set embedded on
SQL>
SQL> select '@getaview ' || view_name
  2  from user_views
  3  /
@getaview EMP_PUBLIC_DATA

@getaview AQ$EMP_CHANGES_S
@getaview VIEW_T
@getaview DEPT_EMP_VIEW
@getaview DEPARTMENT_10
@getaview AQ$_EMP_CHANGES_F
@getaview AQ$EMP_CHANGES
@getaview AQ$EMP_CHANGES_R
SQL>
SQL>
SQL> select '@' || view_name
  2  from user_views
  3  /
@EMP_PUBLIC_DATA
@AQ$EMP_CHANGES_S
@VIEW_T
@DEPT_EMP_VIEW
@DEPARTMENT_10
@AQ$_EMP_CHANGES_F

@AQ$EMP_CHANGES
@AQ$EMP_CHANGES_R
SQL>
SQL> set termout on
SQL> set heading on
SQL> set feedback on
SQL> set verify on
SQL>
SQL>

   
  








Related examples in the same category

1.Query user_views
2.Query user-defined view info from USER_VIEWS table
3.If view exists, drop view
4.List view text from user_views