Technical Article

Relacionamento entre tabelas

,

O script apenas gera o relacionamento entre as tabelas para uma facil vizualização e documentação.

This script just show the relationship between tables, foreign keys, to easy view and documentation.

 

Para mais... http://leka.com.br

SELECT b.name AS 'Tabela' ,
a.name AS 'Chave Extrangeira' ,
c.name AS 'Tabela Pai'
FROM sys.foreign_keys A INNER JOIN sys.objects B ON a.parent_object_id = b.object_id
JOIN sys.objects C ON c.object_id = a.referenced_object_id ORDER BY b.name ASC

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating