在使用implict update table 时,发现其中一个表一定要有唯一约束,否则会报错!但是oracle可以使用hints:/*+ BYPASS_UJVC*/ 屏蔽掉队唯一性的检查。具体测试过程如下:
SQL> CREATE TABLE test_a(
2 id NUMBER ,
3 score NUMBER );
Table created.
Elapsed: 00:00:00.10
SQL>
CREATE TABLE test_b(
2 id NUMBER);
Table created.
Elapsed: 00:00:00.01
SQL>
SQL> INSERT INTO test_a VALUES(1,100);
INSERT INTO test_a VALUES(2,200);
1 row created.
Elapsed: 00:00:00.01
SQL>
INSERT INTO test_a VALUES(3,300);
1 row created.
Elapsed: 00:00:00.00
SQL>
1 row created.
Elapsed: 00:00:00.00
SQL> INSERT INTO test_b VALUES(1);
1 row created.
Elapsed: 00:00:00.01
SQL> INSERT INTO test_b VALUES(2);
1 row created.
Elapsed: 00:00:00.00
S