If I want to know the columns associated with a table, I can do a join on the sys.tables and sys.columns tables
If I wnnt to know the columns associated witn a view, I can do a join on the sys.views and sys.columns tables.
In both cases, I would join on object_id.
If a column appears in a view, it has two records in the sys.columns table - one with an object_id for the view and one with a different object_id for the table.
Is there any table that joins tables and views so that I might determine the underlying tables in a view?
If I wnnt to know the columns associated witn a view, I can do a join on the sys.views and sys.columns tables.
In both cases, I would join on object_id.
If a column appears in a view, it has two records in the sys.columns table - one with an object_id for the view and one with a different object_id for the table.
Is there any table that joins tables and views so that I might determine the underlying tables in a view?