How to find if a Column is used anywhere in the database

To get the table where this column use you can use this query.

 SELECT *  
 FROM sys.tables  
 WHERE tables.object_id IN (SELECT  
      OBJECT_ID  
 FROM sys.columns  
 WHERE columns.name LIKE '%CDRUGNAME%') -- use your column name  


Popular posts from this blog

WPF Crystal Report Viewer Using SAP

ASP.NET MVC razor SAP Crystal report