RATE THIS ANSWER
0
Click to Vote:
0
0
A query against the DB2 catalog will answer your question.
To find the number of views, something like this will work:
SELECT COUNT(*) from SYSIBM.SYSVIEWDEP
WHERE BTYPE = 'V' -- this means VIEW
AND BNAME = 'name of table in question'
To find the names of the views on a given table, something like this:
SELECT DCREATOR, DNAME <-- the CREATOR & NAME of the view
FROM SYSIBM.SYSVIEWDEP
WHERE BNAME = 'a given table'
AND BCREATOR = 'owner of the given table'
ORDER BY ...
===
part 2 - It was pointed out that I had mistyped the columns in the SELECT list in the second query above. These have been corrected.
meandyou (Steve)
Last Answered:
Sep 23 2009 3:37 PM GMT by Meandyou 
1795 pts.