查找表名是否存在于某个函数或者视图中:web
select distinct object_name(id) from syscomments where id in (select id from sysobjects where type in('V','P')) and text like '%表名%'