Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
scelamko
Constraint Violating Yak Guru
309 Posts |
Posted - 2008-02-05 : 18:19:32
|
Guys,Below is the query that I use to generate foreign key name, child table and parent table, but I would also like to add parent and child columns which are part of the relationship to the select list.select o.name, a.name as child, b.name as parentfrom sysobjects o inner join sysforeignkeys f on f.constid = o.id inner join sysobjects a on a.id = f.fkeyidinner join sysobjects b on b.id = f.rkeyidIs there anyway to do this Any comments and suggestions would helpThanks |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-02-05 : 23:03:13
|
Checked information_schema.CONSTRAINT_COLUMN_USAGE? |
 |
|
|
|
|