根据关键字查询存储或表
--根据关键字查询SP select distinct a.name from sysobjects a,syscomments b where a.id=b.id and a.xtype='P' and b.text like '%XXXXX%' order by name --根据列名查询table SELECT a.name AS TableName,b.Name,b.[length] FROM sysobjects a ,syscolumns b WHERE a.id=b.id AND a.type='u' AND b.name LIKE '%XXXXX%'