SQLServer - 如何在我的表上查找从属表? [英] SQLServer - How to find dependent tables on my table?

查看:147
本文介绍了SQLServer - 如何在我的表上查找从属表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 SQLServer

我有一个表 user


  • id

名称

/ code>

email

还有一些其他表(约200多个表),其中有些使用 作为外键在级联删除

There are some other tables (about 200 more tables), some of which use user.id as foreign key on cascade delete.

所以,我想知道 - 哪些表使用这个外键( user.id )?

So, I want to find out - Which tables use this foreign key (user.id) ?

使用 SQL Server Management Studio访问我的sql服务器

I am accessing my sql-server with SQL Server Management Studio.

推荐答案

SQL Server管理工作室,您可以右键单击对象资源管理器中的表,然后选择查看依赖关系。这将打开一个新窗口,您可以在其中查看依赖于您的表格的所有其他对象(而不仅仅是表格)。

In SQL server management studio, you can right click your table in the object explorer, and then select 'View Dependencies'. This will open a new window in which you can see all other objects (not just tables) that depend on your table, and on which your table depends.

这篇关于SQLServer - 如何在我的表上查找从属表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆