In [
SQL Server], our Tables [
Primary Key] are used in other tables. This is called a [
Relational Database].
If, like me, you find you have too many tables to keep track of which Primary Key has been used in.
Using [
SQL Server Management Studio] ([
SSMS]), we can use this script to find all the tables that are using the same foreign key.
Replace the 'MyTableID' with the ID you need to find the tables for.
To find all Table Names and their [
Primary Key], use the article below to learn more.▼