RelationalDBDesign
SiteMap
PL/SQL
Stored Objects
PL/SQL Programming
Table Modification
«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
Deleting Object Table - Exercise
Write DML Statements
Objective:
Write INSERT and UPDATE statements.
Exercise Scoring
This exercise is worth a total of 15 points. You will receive up to 10 points for writing the two queries (five points for each query). You will receive up to five points for explaining the techniques that you used and why.
Background
In this exercise, you will write two DML statements. First, update the records within the CUSTOMER_OBJ_TABLE table and set STATE within ADDRESS_TYPE to LA, where STATE is HI. Second, delete the records from the
PRODUCT_OBJ_TABLE table, where CURRENT_INVENTORY_COUNT = 5.
Download files
Developer: There are no additional files that the student needs to download for this exercise other than the database schema & data, which, I believe, will be part of the standard download.
Instructions
For the first SQL statement, use dot notation to traverse to the attribute of the object type. The second SQL statement is a simple DELETE statement.
Now Answer this .
How many records are updated by the first SQL statement?
How many records are deleted by the second SQL statement?
Hints
To write the first SQL statement, use dot notation and table alias.
Submitting your exercise
After you have defined the SQL statements and added you@r explanation for the techniques that you used and why, place them within the text area below and click the
Submit
button to submit them. Remember that you must submit all your responses to this exercise at once.