Hi. I am looking to populate PART_NUM column of warranty_info table. I want this column to be filled with the data of SUPPLIER_NUM column of item_list table. item_code is the common column between the two tables. I have tried the following query.
INSERT INTO warranty_info (PART_NUM)
SELECT (SUPPLIER_NUM)
FROMĀ item_list,warranty_info
WHERE warranty_info.item_code=item_list.ITEM_CODE;
When I tried executing this query , I got the following error.
ORA-01400: cannot insert NULL into (WARRANTY_INFO.WARRANTY_ID). warranty_id is the primary key of the warranty_info table. I just want to populate the PART_NUM column of warranty_info table with the data in SUPPLIER_NUM column of item_list table. One more thing is, all the columns in warranty_info table has data except PART_NUM in which I am trying to populate data. What am I missing? Thanks.