The name of the table to which the foreign key has been created.
fk_ten
The name of the foreign key you want to disable.
For example
CREATE T ABLE sanpham ( id_sanpham INT PRIMARY KEY, ten_sanpham VARCHAR(50) NOT NULL, phan_loai VARCHAR(25) );
CREATE TABLE hangtonkho ( id_hangtonkho INT PRIMARY KEY, id_sanpham INT NOT NULL, soluong INT, luong_toithieu INT, luong_toida INT, CONSTRAINT fk_htk_id_sanpham FOREIGN KEY (id_sanpham) REFERENCES sanpham (id_sanpham) );
In this example, we created the parent table, sanpham, with the primary key including the information field id_sanpham. Then there is a child table named hangtonkho with a foreign key with deletion constraint. The CREATE TABLE statement creates a foreign key on the hangtonkho table named fk_htk_id_sanpham. The foreign key forms the relationship between the id_sanpham column in the hangtonkho table and id_sanpham in the sanpham table.
Foreign Key (Cascade Delete) in SQL Server
Foreign Key (Set Null) foreign key in SQL Server
If you want to re-enable the foreign key, run the following command.
ALTER TABLE hangtonk ho CHECK CONSTRAINT fk _htk_id_sanpham;
The example above uses the ALTER TABLE command to re-enable the foreign key named fk_htk_id_sanpham in the hangtonkho table.
Previous article: Disable foreign key in SQL Server
The following article: Unique binding in SQL Server
in this chapter, we will learn how to create a remote git repository, from which we will mention it as a git server. we need a git server to allow the team to collaborate.
to activate the windows 10 license, users need to spend a large amount of money to buy the win 10 pro key and activate it. in that case, readers can save money and use the win 10 pro key codes compiled by taimienphi in this article.
windows product activation, or wpa, is a licensing process introduced by microsoft corporation on all versions of windows operating systems. wpa was first introduced on windows xp and still exists on windows server 2003, windows vista, windows server 2008 and windows 7.
maintaining ssh credentials is an important part of every administrator's security protocol. today's article will show you how you can reduce the keys you need to maintain by linking your ssh login information with your gpg key.
many people believe that floating edges are born to help visually impaired people interact with computers better, but this is not its original purpose.
many keys, like f3, may not be of much use and will be more useful when reusing it to perform other functions. today's article will show you how to remap the fn keys on macos.
windows 10 finally supported with ctrl + c and ctrl + v keys to paste in the command prompt window. however, by default this feature is not enabled and you have to take a few simple steps to activate it.
today's tipsmake will show you how to fix unresponsive laptop keys. if after cleaning the base frame and reinstalling the keys the problem is still not resolved, you may need to completely replace the specific key or the entire keyboard.
game translators, coordinators at a non-profit international organization or flight attendants are considered extremely hot jobs for those who know foreign languages.