外键ORA-00001唯一约束违反SQL约束

时间:2020-06-18 17:16:41

标签: oracle foreign-keys

这是错误消息:

test_data %>%
  mutate_if(~ !any(grepl("[A-Za-z]", .)),
            ~ as.numeric(str_replace_all(., "\\s", "")))

即使我禁用了外键约束,也会发生这种情况:

代码:

Error starting at line : 207 in command -
    INSERT ALL
        INTO employees
            VALUES
                  ( 777, 'Pereira', 'Daniele',
                    'x1400', 'name@email.com', '4',
                    1088, 'Head Cashier' )
        INTO employees
            VALUES
                 ( 18161884, 'Samuel', 'Rowbotham',
                   'x6400', 'drsamuelrowbotham@parallax.co.uk', '4',
                   1088, 'Cashier' )
    SELECT * FROM employees WHERE reportsto = 1088
Error report -
ORA-00001: unique constraint (DBS211_202A27.SYS_C001065272) violated

约束信息: ALTER TABLE employees DISABLE CONSTRAINT EMP_RTEMP_FK; INSERT ALL INTO employees VALUES ( 777, 'Pereira', 'Daniele', 'x1400', 'name@email.com', '4', 1088, 'Head Cashier' ) INTO employees VALUES ( 18161884, 'Samuel', 'Rowbotham', 'x6400', 'drsamuelrowbotham@parallax.co.uk', '4', 1088, 'Cashier' ) SELECT * FROM employees WHERE reportsto = 1088; ALTER TABLE employees ENABLE CONSTRAINT EMP_RTEMP_FK; Table EMPLOYEES altered. Error starting at line : 207 in command - INSERT ALL INTO employees VALUES ( 777, 'Pereira', 'Daniele', 'x1400', 'name@email.com', '4', 1088, 'Head Cashier' ) INTO employees VALUES ( 18161884, 'Samuel', 'Rowbotham', 'x6400', 'drsamuelrowbotham@parallax.co.uk', '4', 1088, 'Cashier' ) SELECT * FROM employees WHERE reportsto = 1088 Error report - ORA-00001: unique constraint (DBS211_202A27.SYS_C001065272) violated Table EMPLOYEES altered.

1 个答案:

答案 0 :(得分:0)

Select JavaScript VM instance

这是RTFQ /长时间工作并且变得模糊的情况。第二个值是1800,而不是两个都为1088。