且构网

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

删除外键时在显示视图中出现问题?

更新时间:2022-10-16 12:11:19

javad,

我想澄清您的问题.据您说,教育中有一些文件,如eduid,eduname,educode.在此表中,eduid是 primarykey .

与da中的da相同,字段为stuid,stuname,eduid.在此表中,stuid是 primarykey ,而eduid是 Foreignkey ,它是教育表中的主键.

您想删除一个教育条目权限.如果尝试这样做,将会发生错误,因为我们对该条目没有任何依赖关系,因此我们不会删除该分支的主键.
我们只能删除dat分支中没有学生的分支意味着.

如果您真的要删除分支,请首先删除dat分支下的所有学生.

我对你的问题是正确的.如果不能原谅我,


i have 2 table student and education where use primary key education in student table (foreign key). but when delete once education don''t show student in education in view
What should I do I solve this problem؟
i use windows application.


[edit]"foreign" key, my friend, "foreign". Not "forging", that is a completely different branch of security! - OriginalGriff[/edit]

Hi javad,

I want clarity on your question .According to you education has some fileds like eduid,eduname,educode.in this table eduid is primarykey.

for da same as in student has fields are stuid,stuname,eduid. in this table stuid is primarykey and eduid is Foreignkey which is primarykey in education table.

you want to delete one education entry right.If try to do it ther is an error will be occur b''coz we don''t delete branch primarykey if any dependency on that entry.
we r only able to delete branch means whenever ther is no student in dat branch .

if you really want to delete branch thn first delete all students who are under dat branch.

Am I right in your question .If not forgive me