Re: What views are associated with my table?
Posted in 1998
Michael Hoffman — — source: Informix-list mailing list archive (1991-1998)
In <FGzemDAZtzq10A94@excelsis.co.uk> article, Dave Cook mentioned that:
: How can I found out, from the database, if a table has any views
: associated with it?
: Engine is Online 7.22
Not sure if its the easiest or most elegant way, but this is how I do it:
select count(*) from sysviews where viewtext matches "*TABNAME*"
This will return the number of views on that table. If you want to know
what the names of the views are, use the following, which returns the "create
view VIEWNAME" line of the view:
Select viewtext from sysviews
where seqno = 0
and tabid in
(select tabid from sysviews where viewtext matches "*TABNAME*")
Michael Hoffman