Question
create table Inventory( I_FlowerNumber number , I_Location varchar(20), I_Condition varchar(20), I_Search varchar(40),I_Delete varchar(20), I_Add number,I_Quantity number,PRIMARY KEY (I_FlowerNumber)); create table vendor (V_VendorID VARCHAR(20) ,V_PhoneNumber NUMBER,
create table Inventory( I_FlowerNumber number , I_Location varchar(20), I_Condition varchar(20), I_Search varchar(40),I_Delete varchar(20), I_Add number,I_Quantity number,PRIMARY KEY (I_FlowerNumber));
create table vendor (V_VendorID VARCHAR(20) ,V_PhoneNumber NUMBER, V_Address VARCHAR(20), V_DirectToStore VARCHAR(10), V_Status VARCHAR(5), V_LastUpdatedBy DATE, V_Password VARCHAR(10), V_LasteUpdateTime TIMESTAMP, PRIMARY KEY(V_VendorID ) );
CREATE TABLE purchase_order (
order_number int NOT NULL,
order_name char(50) NOT NULL,
customer_address char(50),
customer_zip int, customer_city char (50),
order_total varchar(50),
v_vendorID VARCHAR(20),
ITEM_NUMBER int NOT NULL,
CONSTRAINT pk_purchase_order PRIMARY KEY (order_number),
FOREIGN KEY (V_VendorID) REFERENCES vendor(V_VendorID),
FOREIGN KEY (ITEM_NUMBER) REFERENCES Inventory(I_FlowerNumber)
);
I need to answer the question below using the information above. I am having trouble getting the command to work without getting error messages. What am I missing below to make the command work?
insert into purchase_order (order_number, order_name, customer_address , customer_zip, customer_city , order_total,v_vendorID,ITEM_NUMBER)
values (5, 'Happy', '', 8, '', '','123','300');
I also tried
insert into purchase_order (order_number, order_name, customer_address , customer_zip, customer_city , order_total,v_vendorID,ITEM_NUMBER)
values (5, 'Happy',null, 8, null, null,'123','300');
Neither of them worked.
I am getting ORA-02291: integrity constraint violated - parent key not found
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started