Question: I'm working on this problem in SQL Developer. I'm not sure how to correct my worksheet input to resolve the error messages. Could someone explain
I'm working on this problem in SQL Developer. I'm not sure how to correct my worksheet input to resolve the error messages. Could someone explain how to fix this?
Worksheet:
CREATE TABLE ORDERITEMS ( Order_numb NUMBER(4), Item_numb NUMBER(2), ISBN VARCHAR2(10), Quantity NUMBER(3) NOT NULL, PaidEach NUMBER(5,2) NOT NULL, CONSTRAINT orderitems_pk PRIMARY KEY (order_numb, item_numb), CONSTRAINT orderitems_order_numb_fk FOREIGN KEY (order_numb) REFERENCES orders (order_numb) , CONSTRAINT orderitems_isbn_fk FOREIGN KEY (isbn) REFERENCES books (isbn) , CONSTRAINT oderitems_quantity_ck CHECK (quantity > 0) ); INSERT INTO ORDERITEMS VALUES (1000,1,'3437212490',1,19.95); INSERT INTO ORDERITEMS VALUES (1001,1,'9247381001',1,31.95);
Script Output:
Error starting at line : 1 in command - CREATE TABLE ORDERITEMS ( Order_numb NUMBER(4), Item_numb NUMBER(2), ISBN VARCHAR2(10), Quantity NUMBER(3) NOT NULL, PaidEach NUMBER(5,2) NOT NULL, CONSTRAINT orderitems_pk PRIMARY KEY (order_numb, item_numb), CONSTRAINT orderitems_order_numb_fk FOREIGN KEY (order_numb) REFERENCES orders (order_numb) , CONSTRAINT orderitems_isbn_fk FOREIGN KEY (isbn) REFERENCES books (isbn) , CONSTRAINT oderitems_quantity_ck CHECK (quantity > 0) ) Error report - ORA-00904: "ORDER_NUMB": invalid identifier 00904. 00000 - "%s: invalid identifier" *Cause: *Action:
Error starting at line : 14 in command - INSERT INTO ORDERITEMS VALUES (1000,1,'3437212490',1,19.95)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
