Run the command script to the right.
The order package contains procedures to manage orders.
- Procedure ADD_ITEM_TO_SHOPPING_CART adds the product to the shopping cart. If product already exists, it updates the quantity.
- Procedure CREATE_ORDER creates orders based on the shopping cart contents.
- Procedure PRINT_ORDER prints customer and order details based on order_id.
Features of this package are:
- Loops:
- FOR i IN cursor LOOP ... END LOOP
- FOR i IN 1..N LOOP ... END LOOP
- FOR i IN (SELECT ...) LOOP ... END LOOP
- LOOP ... EXIT WHEN ... END LOOP
- Use of procedures, functions and types from other packages:
- product_package.verify_product_availability
- customer_package.customer_record
- Collection type:
- TYPE ... IS VARRAY(10) OF ...
- VARRAY.COUNT
- SQL extensions and Built-in functions:
- DUAL
- SYSDATE
- DECODE
- TO_CHAR
You should see several successful statement messages in the right panel.