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 |
|
alejo46
Posting Yak Master
157 Posts |
Posted - 2012-02-13 : 10:34:42
|
Good morningim started to learn sql server programming, and i've got this question:In our production system in a database there are more than 100 tables.i need to practice the different types of joins in multiple tables.The problem arises how to identify which tables and colums i should do a join because there are houndreds of them.ive tried to find out over the internet some scripts. and ive got decens of them, but is not what i expected i.e:select object_name(fkeyid), col_name(fkeyid, fkey) as column_name, col_name(rkeyid, rkey) as referenced_column_name from sysforeignkeys where object_name(rkeyid) like '%Abon%' order by constidWhat i want is to see (graphically) the tree from the top to the bottom of related tables i.e : main Table -> child table -> another child table - and so on Ive heard the tools Management Studio (Sql server 2008) or Profiler (sql server 200) can i get something, if so how do i start with both of them.the purpose i said before is to identify related tables which i could work for joing multiples tables.Plase, i need yor help, and i´ll apprecaite your help in advance |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2012-02-13 : 10:38:19
|
| If you want to query a table, use sp_depends 'table name' to find the related objectsMadhivananFailing to plan is Planning to fail |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|