RelationalDBDesign
SiteMap
PL/SQL
Stored Objects
PL/SQL Programming
PL/SQL
«Prev
Next»
Programming PL/SQL
Querying Object Tables
Using Oracle Objects
Object Oriented Terms
Query Object Tables
Collections Varrays Oracle
Querying Nested Tables
Practical/SQL Examples
SQL Query Example
Querying Complex Object
Alternate Query Example
Object Relational Summary
Querying Related Tables
Understanding Related Object Tables
Analyzing Dangling References
Writing deref Queries
Querying Object Tables
Creating PL/SQL Block
Object Relational Conclusion
Querying Nested Tables
Flattening nested Table
Query Flattens Nested Table
Simple varray Query
Query to Flatten varray
Flatten varray - Exercise
Procedure retrieves Nested Table
Varrays Nested Table Conclusion
Object Table Modification
Modifying Object Tables
Insert into Table
SQL Insert Rows
SQL Update Object Table
Subquery in Update
Delete Rows from Table
DML Statements Conclusion
Modifying Nested Tables
Modifying nested Varrays
Insert Rows into Table
Varray insert Command
Updating nested Table Rows
Updating Varray Rows
Delete Nested varray Command
Delete Entire Array
Nested Tables Conclusion
Modifying LOBs
Delete Entire Array or Nested Table - Exercise
Delete entire array or Nested Table
Delete from Nested Table
Objective:
Write a delete command to remove rows from a nested table.
Exercise scoring
This exercise is worth a total of 10 points. You will receive up to five points for writing the
INSERT
statement and displaying the results with the correct syntax. You will receive up to five points for adding an explanation.
Background
Write an
INSERT
statement to insert a row into the nested table 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.
Build a statement to delete the records from the nested table within the
SALE_HEADER
table, where
id
is 34.
After writing the
DELETE
statement, answer the following questions:
How do you delete a particular (single) record from a nested table?
How do you delete all the nested table records for all the records within the main table?
Hints
Use the
TABLE
keyword.
Submitting your exercise
After you have
defined the
DELETE
statement,
added your explanation, and
answered the two questions,
place everything in the text area below and
click the
Submit
button.
Submit