如何通过检查或触发器实现ondelete限制 [英] how to implement ondelete restrict by a check or a trigger

查看:83
本文介绍了如何通过检查或触发器实现ondelete限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,在oracle 10g中没有限制动作ondelete,这可以防止删除引用的记录...如何使用触发器或支票或其他方式实现此约束...

谢谢事先

hello everybody , in oracle 10g there is no restrict action ondelete , which prevents deleting the referenced record ... how to implement this constraint using a trigger or a check or whatever ...
thanks in advance

推荐答案

我觉得你误会了什么。如果在Oracle中创建外键约束,则默认操作是防止在存在子记录时在主表上删除。



例如,请查看: http://docs.oracle.com/cd/B19306_01/server.102/ b14200 / clauses002.htm#i1015699 [ ^ ]
I think you have misunderstood something. If you create a foreign key constraint in Oracle, the default action is to prevent a deletion on master table if child records exist.

For example, have a look at: http://docs.oracle.com/cd/B19306_01/server.102/b14200/clauses002.htm#i1015699[^]


这篇关于如何通过检查或触发器实现ondelete限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆