Find All References to View

前端 未结 3 1872
野性不改
野性不改 2020-12-15 00:45

I\'ve got various databases, and what to be sure I am removing something (a view in this case) that is truly orphaned. Is the the correct SQL to be using:

S         


        
3条回答
  •  再見小時候
    2020-12-15 01:06

    I am not sure but i guess you can use something like this if your view is used in some stored procedure

    SELECT *  
    FROM syscomments c  
    INNER JOIN sysobjects o ON c.id =o.id 
    WHERE text LIKE '%my_view_name%' AND xtype ='p'
    

提交回复
热议问题