且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

删除外键常量并更新表

更新时间:2023-02-02 22:50:31

不,您不应该删除外键.
相反,请查看CASCADE 选项 [ ^ ] .
更改您的表结构以使用它.
No you should not be dropping the foreign key.
Instead have a look at the CASCADE option[^].
Alter your table structure to use it.


考虑了Abhinav的建议-但是,如果您继续这样做,应该这样做:

Give thought to Abhinav''s advice - but if you go ahead this should do it:

ALTER TABLE tbl_name DROP FOREIGN KEY fk_symbol;



这是我使用的实际示例:



Here''s an actual example that I have used:

ALTER TABLE VendaTic.RoleMaster DROP FOREIGN KEY Feature_Code;


您好,亲爱的,

无论您要问什么,这都是不可能的.根据您的说法,employee表通过外键与另一个表关联.如果您不希望其他表重新登录,请执行以下步骤

1.右键单击雇员表,然后选择修改.然后,表将打开,并带有其列和数据类型.选择作为外键的列.
2.右键单击该列并选择关系.
3.将打开一个窗口,您可以在其中选择 插入并更新规范 ,然后选择更新规则,然后选择无操作从下拉列表中.
4.现在,您的表将允许您进行更新.

希望这会帮助你.如果没有,则再次查询.
Hello Dear,

What ever you are asking that is not possible. According to you the employee table is associated with another table by a foreign key. If you don''t want another table reocord then do the following steps

1. right Click on the employee table and select modify. Then table will open with its column and datatypes. selct the column which is the foreign key.
2.Right click on that column and select relaionship.
3.One window will open where you select insert and update specification and selct the update rule then select no action from the dropdown.
4. Now your table will allow you to update.

Hope this will help you. If not then query again.