Database Programming With PL/SQL 3-1: Practice Activities: Review of SQL DML
Database Programming With PL/SQL 3-1: Practice Activities: Review of SQL DML
Database Programming With PL/SQL 3-1: Practice Activities: Review of SQL DML
com
Data Definition Language (DDL) When you create, change, or delete an object in a database.
Data Manipulation Language When you change data in an object (for example, by inserting
(DML) or deleting rows).
Try It / Solve It
1. Evaluate the following SQL statement.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
2
grocery_items
4. Write and execute three SQL statements to explicitly add the above data to the table.
5. Write and execute a SQL statement that will explicitly add your favorite beverage to the table.
UPDATE grocery_item
SET description = ‘tomato catsup’
WHERE product_id=112
7. Write and execute a SQL statement that will implicitly add your favorite candy to the table.
INSERT INTO grocery_item
VALUES (114,'KitKat','Candy');
8. Write and execute a SQL statement that changes the soap brand from “Ivory” to “Dove.”
UPDATE grocery_item
SET BRAND = 'Dove'
WHERE product_id=111
Use the following table for questions 9 through 14.
new_items
9. Write and execute SQL statements to create the new_items table and populate it with the data in
the table.
10. Write a SQL statement that will update the grocery_items table with the brand and description from
the new_items table when the product ID values match. If they don’t match, add a new row to the
grocery_items table. DO NOT EXECUTE YOUR STATEMENT YET.