SQL查找含有指定表名或者字段名的方法

来源:互联网 发布:nagle算法 示例 编辑:程序博客网 时间:2024/06/13 12:57
SELECT DISTINCT o.name, o.xtype  
FROM syscomments c  
INNER JOIN sysobjects o ON c.id=o.id  
WHERE c.TEXT LIKE '%Timetable%'


 select a.name from sysobjects a   
 inner join syscolumns b on a.id = b.id   
 where a.xtype='U'   
 and b.name = 'siteid'
原创粉丝点击