Using the system table VIEWCOLUMNS, you can determine the following database information, among other things:
·
All tables or view tables
that form the basis for your own view table MYVIEW
SELECT
tableowner, tablename
FROM DOMAIN.VIEWCOLUMNS
WHERE owner = user
AND viewname = 'MYVIEW'
·
Column of the table or
view table that forms the basis for column V_COL of your own view table
SELECT
tableowner, tablename, columnname
FROM DOMAIN.VIEWCOLUMNS
WHERE owner = user
AND viewname = 'MYVIEW'
AND viewcolumnname = 'V_COL'
·
Determine whether the
column TITLE of table CUSTOMER forms the basis of a view table
SELECT
owner, viewname, viewcolumnname
FROM DOMAIN.VIEWCOLUMNS
WHERE tablename = 'CUSTOMER'
AND columnname = 'TITLE'
All views: see VIEWS
Definition of a view: see VIEWDEFS
Existence of a view: see TABLES