select distinct a.* from sysobjects a
left join syscomments b on a.id=b.id
where a.xtype='p' and b.text like '%表名字%' order by a.refdate desc
left join syscomments b on a.id=b.id
where a.xtype='p' and b.text like '%表名字%' order by a.refdate desc