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 |
|
clarkbaker1964
Constraint Violating Yak Guru
428 Posts |
Posted - 2004-10-26 : 13:14:34
|
How can I find all tables in a db that are not particpating in a relationship. |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2004-10-26 : 14:42:17
|
| [code]select object_name(id) as non_ref_tablefrom sysobjects where id not in(select fkeyid from sysreferences union select rkeyid from sysreferences)and type = 'U'[/code]rockmoose/* Chaos is the nature of things...Order is a lesser state of chaos */ |
 |
|
|
clarkbaker1964
Constraint Violating Yak Guru
428 Posts |
Posted - 2004-10-26 : 15:04:12
|
Thank you! |
 |
|
|
|
|
|