更改Oracle中的主键值 [英] Change primary key value in Oracle

查看:333
本文介绍了更改Oracle中的主键值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法更改由另一个表作为外键引用的主键的值?

Is there a way to change the value of a primary key which is referenced by another table as foreign key?

推荐答案

更简单的方法是插入新行并删除旧行。 (在执行删除之前,请更新其他表中的任何引用行)

An easier alternative is to insert a new row and delete the old one. (Update any referencing rows in other tables before you do the delete)

这篇关于更改Oracle中的主键值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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