sql - ORA-02291 Integrity Constraint Error -
I am quite new in SQL; , Customer ID, ACCOUNTID: I am currently trying to fill the tables I have created with some sample data, but this error message is executed whenever I do this:
< Error in starting in line 1 in the order CustomerType, CustomerStatus) values (123,485, 227,482, 'residential', 'qualified') Error Report: SQL Error: ORA-02291: Violation of Integrity Barrier (T31833821.SYS_C0041532) - Parents key 02291. 00000 not found - "Integrity Violation - original key was not found. * Reason: A matching key in a foreign key value is not a primary priority. * Action: Remove the foreign key or add the matching primary key * Below is the code that I used to create my table of the customer (I have also created another table for the account ID, and they are currently both empty).Customer ID (no. NULL, ACCOUNTID number (20) No NULL, CustomerType VARCHAR (10) No NULL, CustomerStatus VARCHAR (10) No NULL, customer_pk Primary key (CustomerID) ), Obstruction check_customer_status check (CustomerStatus IN ('ineligible', 'qualified')), Construct check_group_type check (in customer type ('non-receipt', 'residential')); I tried to install and insert the sample data foreign key, but kept displaying the error mentioned above upon display.
change table Add Customer Alien Key (ACCOUNTID) Reference Account (Account ID); Include customer (customer ID, account ID, customer type, customer status) in prices (123485, 227482, 'non-resident', 'eligible');
Anyway can I fix this? I am using Oracle SQL
Comments
Post a Comment