在对我公司的问题进行故障排除时,我更新了表中的所有文件,而不是需要使用测试的特定文件。
create table _file_*date*_BAK as select * from _file;
update _file set category = 'null';
commit;
Run Code Online (Sandbox Code Playgroud)
尝试修复它时,我尝试从备份文件中提取,但出现错误
update (select a.category as OLD, b.category as NEW
from _file a inner join _file_*date*_BAK b on a.filecod = b.filecod) t
set t.old = t.new;
Run Code Online (Sandbox Code Playgroud)
错误报告 -
SQL Error: ORA-01779: cannot modify a column which maps to a non key-preserved table
01779. 00000 - "cannot modify a column which maps to a non key-preserved table"
*Cause: An attempt was made to insert or update …Run Code Online (Sandbox Code Playgroud)