All Forums Tools
maddy@1 6 posts Joined 05/08
18 Nov 2009
List of views created on a table

HiI would like to the list of view names that are created on a particular table.For example, there are 2 views view1 and view2 that are created on a table Table1. Is there any query by which i can know that there are 2 views (view1 & view2) that are existing on table1.ThanksMadhavi.

20 Nov 2009

SELECT TableNameFROM DBC.TablesWHERE TableType = 'V'and ExplainText LIKE '% your table name here %'Group By 1Order By 1;--Note sure it is ExplainText or SQLText--Please check accordinglyThis will give you your desired results.

maddy@1 6 posts Joined 05/08
20 Nov 2009

Thanks Arun KumarThis one helped me... :)For other users... the exact answer would be..SELECT TableNameFROM DBC.TablesWHERE Tablekind = 'V'AND requestText LIKE '%The table name%'GROUP BY 1ORDER BY 1; Thanksmadhavi.

You must sign in to leave a comment.