This might serve as a starting point
SELECT
a.id AS Tableid, a.Name AS TableName, b.name AS colName, b.colid AS colId,
d.name AS constraintname, d.xtype AS constrainttype , e.name
FROM
((((sysobjects a INNER JOIN syscolumns b ON a.id=b.id)
LEFT OUTER JOIN sysconstraints c ON c.id=b.id AND c.colid=b.colid-1 )
LEFT OUTER JOIN sysobjects d ON d.parent_obj=a.id AND c.constid=d.id)
LEFT OUTER JOIN sysobjects e ON e.parent_obj=a.id AND e.xtype='TR')
WHERE
a.xtype= 'U'
ORDER BY
1, 2, b.colid