SELECT DISTINCT
o.name,
o.xtype
FROM
sysobjects o,
syscomments s
WHERE
o.id = s.id
AND o.xtype IN ('p', 'v','FN')
AND s.text LIKE '%RecopID%'
select b.name as tablename,a.name as columnname,c.name as typename,a.max_length as typelength
from sys.columns a inner join sys.tables b on b.object_id=a.object_id
inner join sys.types c on c.system_type_id=a.system_type_id
where a.name='RecopID'
order by b.name,a.column_id
select name from dbReEmployee.dbo.syscolumns where id=(select id from dbReEmployee.dbo.sysobjects where name='ReAS_ColorInformation') order by colid