How to find which views are using a certain table in SQL Server (2008)?

后端 未结 7 893
孤街浪徒
孤街浪徒 2021-01-31 13:30

I have to add a few columns to a table and I also need to add these columns to all the views that use this table.

Is it possible to get a list of all the views in a data

7条回答
  •  有刺的猬
    2021-01-31 14:30

    This should do it:

    SELECT * 
    FROM   INFORMATION_SCHEMA.VIEWS 
    WHERE  VIEW_DEFINITION like '%YourTableName%'
    

提交回复
热议问题