Aug 30, 2004

SOME COOL SQL SERVER STUFF
sp_depends 'dbo.M_Artifact'

select object_name(constid) as constraint_name,
object_name(fkeyid) as table_name
from sysreferences
where object_name(rkeyid) in (select distinct object_name(rkeyid) as ConstraintName
from sysreferences
where fkey1>1)

Select * from sysreferences

select object_name(2071678428)

Select
select distinct object_name(rkeyid) as ConstraintName
from sysreferences
where fkey1>1