Question: Use the following SQL Oracle code to answer the following 2 questions: 1 ) Add the following row to the REP table: rep ID: 3

Use the following SQL Oracle code to answer the following 2 questions:
1) Add the following row to the REP table: rep ID: 35, first name: Fred; last name: Kiser;
address: 427 Billings Dr.; city: Cody; state: WY; postal: 82414; cell phone: 307-555-6309;
commission: 0.00; and rate: 0.05. Display the contents of the REP table.
2) Run the script file for the KimTay Pet Supplies database to create the five tables and add
records to the tables. Be sure to select the script file for the particular DBMS that you are
using (MySQL, Oracle, or SQL Server).
SQL code:
-- Create the CUSTOMER_INFO table
CREATE TABLE CUSTOMER_INFO (
ID NUMBER PRIMARY KEY,
NAME_FIRST VARCHAR2(20),
NAME_LAST VARCHAR2(20),
ADDRESS VARCHAR2(20),
CITY VARCHAR2(15),
STATE_POSTAL VARCHAR2(2),
EMAIL VARCHAR2(100),
BALANCE NUMBER(10,2),
CREDIT_REP_LIMIT NUMBER(10,2)
);
-- Insert data into CUSTOMER_INFO table
INSERT INTO CUSTOMER_INFO (ID, NAME_FIRST, NAME_LAST, ADDRESS, CITY, STATE_POSTAL, EMAIL, BALANCE, CREDIT_REP_LIMIT)
VALUES (126, 'Joey', 'Smith', '17 Fourth', 'Cody', 'WY', 'jsmith170@example.com', 80.68,500.00);
INSERT INTO CUSTOMER_INFO (ID, NAME_FIRST, NAME_LAST, ADDRESS, CITY, STATE_POSTAL, EMAIL, BALANCE, CREDIT_REP_LIMIT)
VALUES (182, 'Rafion', 'Billyruffe', '21 Simple Cir', 'Garland', 'WY', 'billyruffe@example.com', 43.13,750.00);
INSERT INTO CUSTOMER_INFO (ID, NAME_FIRST, NAME_LAST, ADDRESS, CITY, STATE_POSTAL, EMAIL, BALANCE, CREDIT_REP_LIMIT)
VALUES (227, 'Sandra', 'Pincher', '53 Vende Ln', 'Powell', 'WY', 'spinch20@example.com', 156.38,500.00);
INSERT INTO CUSTOMER_INFO (ID, NAME_FIRST, NAME_LAST, ADDRESS, CITY, STATE_POSTAL, EMAIL, BALANCE, CREDIT_REP_LIMIT)
VALUES (294, 'Samantha', 'Smith', '14 Rock La', 'Ralston', 'WY', 'smiths@example.com', 58.60,500.00);
INSERT INTO CUSTOMER_INFO (ID, NAME_FIRST, NAME_LAST, ADDRESS, CITY, STATE_POSTAL, EMAIL, BALANCE, CREDIT_REP_LIMIT)
VALUES (314, 'Tom', 'Rascal', '1 Rascal Farm Rd', 'Cody', 'WY', 'trascal3@example.com', 17.25,250.00);
INSERT INTO CUSTOMER_INFO (ID, NAME_FIRST, NAME_LAST, ADDRESS, CITY, STATE_POSTAL, EMAIL, BALANCE, CREDIT_REP_LIMIT)
VALUES (375, 'Melanie', 'Jackson', '42 Blackwater Way', 'Elk Butte', 'WY', 'mjackson5@example.com', 252.25,250.00);
INSERT INTO CUSTOMER_INFO (ID, NAME_FIRST, NAME_LAST, ADDRESS, CITY, STATE_POSTAL, EMAIL, BALANCE, CREDIT_REP_LIMIT)
VALUES (435, 'James', 'Gonzalez', '16 Rockway Rd', 'Wapiti', 'WY', 'jgonzol@example.com', 230.40,1000.00);
INSERT INTO CUSTOMER_INFO (ID, NAME_FIRST, NAME_LAST, ADDRESS, CITY, STATE_POSTAL, EMAIL, BALANCE, CREDIT_REP_LIMIT)
VALUES (492, 'Elmer', 'Jackson', '22 Jackson Farm Hd', 'Garland', 'WY', 'ejackoson40@example.com', 45.20,500.00);
INSERT INTO CUSTOMER_INFO (ID, NAME_FIRST, NAME_LAST, ADDRESS, CITY, STATE_POSTAL, EMAIL, BALANCE, CREDIT_REP_LIMIT)
VALUES (543, 'Angie', 'Hendricks', '27 Locklear Ln', 'Powell', 'WY', 'ahendricks7@example.com', 61.50,500.00);
INSERT INTO CUSTOMER_INFO (ID, NAME_FIRST, NAME_LAST, ADDRESS, CITY, STATE_POSTAL, EMAIL, BALANCE, CREDIT_REP_LIMIT)
VALUES (616, 'Sally', 'Cruz', '19918th Ave', 'Ralston', 'WY', 'scruz5@example.com', 315.00,750.00);
INSERT INTO CUSTOMER_INFO (ID, NAME_FIRST, NAME_LAST, ADDRESS, CITY, STATE_POSTAL, EMAIL, BALANCE, CREDIT_REP_LIMIT)
VALUES (721, 'Leslie', 'Smith', '123 Sheepland Ful', 'Elk Butte', 'WY', 'lsmith120@example.com', 166.65,1000.00);
INSERT INTO CUSTOMER_INFO (ID, NAME_FIRST, NAME_LAST, ADDRESS, CITY, STATE_POSTAL, EMAIL, BALANCE, CREDIT_REP_LIMIT)
VALUES (795, 'Randy', 'Blacksmith', '75 Stream Rd', 'Cody', 'WY', 'rblacksmith6@example.com', 61.50,500.00);
-- Create the INVOICES table
CREATE TABLE INVOICES (
INVOICE_NUM NUMBER PRIMARY KEY,
INVOICE_DATE DATE,
CUST_ID NUMBER,
FOREIGN KEY (CUST_ID) REFERENCES CUSTOMER_INFO(ID)
);
-- Insert data into INVOICES table
INSERT INTO INVOICES (INVOICE_NUM, INVOICE_DATE, CUST_ID)
VALUES (14216, TO_DATE('11/15/2021','MM/DD/YYYY'),126);
INSERT INTO INVOICES (INVOICE_NUM, INVOICE_DATE, CUST_ID)
VALUES (14219, TO_DATE('11/15/2021','MM/DD/YYYY'),227);
INSERT INTO INVOICES (INVOICE_NUM, INVOICE_DATE, CUST_ID)
VALUES (14222, TO_DATE('11/16/2021','MM/DD/YYYY'),294);
INSERT INTO INVOICES (INVOICE_NUM, INVOICE_DATE, CUST_ID)
VALUES (14224, TO_DATE('11/16/2021','MM/DD/YYYY'),182);
INSERT INTO INVOICES (INVOICE_NUM, INVOICE_DATE, CUST_ID)
VALUES (14228, TO_DATE('11/18/2021','MM/DD/YYYY'),435);
INSERT INTO INVOICES (INVOICE_NUM, INVOICE_DATE, CUST_ID)
VALUES (14231, TO_DATE('11/18/2021','MM/DD/YYYY'),126);
INSERT INTO INVOICES (INVOICE_NUM, INVOICE_DATE, CUST_ID)
VALUES (14233, TO_DATE('11/18/2021','MM/DD/YYYY'),435);
INSERT INTO INVOICES (INVOICE_NUM, INVOICE_DATE, CUST_ID)
VALUES (14237, TO_DATE('11/19/2021','MM/DD/YYYY'),616);
-- Create the INVOICE_LINE table
CREATE TABLE INVOICE_LINE (
INVOICE_NUM NUMBER,
ITEM_ID VARCHAR2(50),

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!