Javatpoint Logo
Javatpoint Logo

Enable a Foreign Key

ALTER TABLE statement is used to enable a foreign key in SQL Server.

Syntax:

Parameter Explanation

table_name: It specifies the name of the table where the foreign key has been created.

fk_name: It specifies the name of the foreign key that you wish to disable.

Example:

We have disabled the foreign key in previous example, now enable the foreign key.

Output:

SQL Enable 1

Now the foreign key is enabled.







Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA