This exercise is worth 10 points.
In this exercise, you are required to write two
UPDATE statements, one each for updating a nested table and a varray.
The first statement will update the data within the
CUSTOMER_OBJ_TABLE table. The second statement will update the data within the
SALE_HEADER table.
- Instructions
- With SQL*Plus, connect to the database by using
PETSTORE as the username, GREATPETS as the password, and MYDB as the host string.
- For the first
UPDATE statement, build a statement to update a record from the CUSTOMER_OBJ_TABLE table, where the ID is 29 and the new values for the varray are 1-800-444-5623 and 1-310-345-8899.
- For the second
UPDATE statement, build a statement to update a record from the SALE_HEADER table, where the ID is 34 and detail_amount within the nested table is 3.50.
The item quantity must be set to 453.
- Now answer this:
Please answer the following questions in the text box below to submit your answers.
- Is it possible to correct the existing data within a varray?
- How would you write a single
UPDATE statement that updates all the records within a detail table?
- Hints
Use the SET and WHERE clauses.
Type (or cut and paste) your plan into the box below to submit your answers. Click the Submit button when finished to submit the exercise. Remember to submit all of your answers at once.