通常、直接の更新は、たとえば、フィールド内で変更したとき:
update table_temp set name = 'Hider' where id = 100;
しかし、更新された値は、単一引用符に含まれ、上記のように更新することができない、それが説明します。
そして、それをテスト。
-- 建立测试表
create table temp_cwh_test_1219
(
id varchar2(10),
name varchar2(20)
);
-- 插入数据
insert into temp_cwh_test_1219 values (1,'Nick');
insert into temp_cwh_test_1219 values (2,'Tom');
-- 更新数据
update temp_cwh_test_1219 set name = '''xxxx''' where id = 1;
-- 1 1 'xxxx'
-- 2 2 Tom
-- 删除测试表
drop table temp_cwh_test_1219;
期待通りの効果。
原則:単純に挿入されるか、または2つの引用符のためのコンテンツを更新する単一引用符を交換してください。