This query should return the descriptions for the Key Constraints correctly. I'm still not done -- I'll post more as things progress.
SELECT
'Key Constraint' as ObjectType,
t.name AS TableName,
kc.name AS ObjectName,
ep.value AS PropertyValue,
ep.major_id as MajorID,
ep.minor_id...
The Index query isn't working right (it's returning the description of the column the index is associated with, instead of the index itself). I only just started working on this, but hopefully it will give you a starting point:
SELECT
ObjectType,
TableName,
ObjectName,
PropertyValue
FROM (...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.