PL/SQL   «Prev  Next»

Erasing Data within LOB - Exercise

Erasing Data within a LOB

Objective: Use PL/SQL to erase portions of data within a LOB column.

Exercise scoring

This exercise is auto-scored.

Background and Overview

In this exercise, you will erase data within a LOB column using PL/SQL.
This exercise uses a simulation of an Oracle environment.

Instructions

In the following simulation exercise, you will be asked to perform a task or set of tasks you have learned in the previous lesson. The instructions will tell you what you need to do at each step but will not tell you exactly how.

Submitting your exercise

Click the Submit button when finished to see the suggested results for the exercise.
    • Log On
      • User Name:
      • Password:
      • Host String:
      • OK
      • Cancel
  1. Description of Relevant Features: The login screen of "Oracle SQL*Plus", an older graphical interface for connecting to an Oracle database. Key features:
    • User Name, Password, Host String Fields: These are input fields where the user must enter their Oracle database credentials:
      • User Name: The Oracle database user name.
      • Password: The corresponding password for the user.
      • Host String: Used to specify the database instance (could be a TNS connection string or service name).
    • OK and Cancel Buttons: These buttons allow users to either attempt the login or cancel the operation.
    • The design and overall layout, including the grey buttons and title bar, reflect a legacy interface, possibly from the late 1990s or early 2000s.
    • Menu bar: Contains basic options like File, Edit, Search, Options, and Help, which are standard for the SQL*Plus client to manage connections, edit sessions, or seek help.

This interface is no longer in use in modern Oracle Database environments, as it has been replaced by more advanced tools, such as Oracle SQL Developer.
Erasing data with LOB 2
2) Erasing data with LOB 2

Erasing data with LOB 3
3) Erasing data with LOB 3

Erasing data with LOB 4
4) Erasing data with LOB 4

Erasing data with LOB 5
5) Erasing data with LOB 5

Erasing data with LOB 6
6) Erasing data with LOB 6

Erasing data with LOB 7
7) Erasing data with LOB 7


With SQL*Plus, connect to the database by using PETSTORE as the User Name, GREATPETS as the Password, and MYDB as the Host String. Approve the entries.
  1. User Name
  2. PETSTORE
  3. S0)Type PETSTORE in the User Name box.
  4. Password,
  5. GREATPETS
  6. (S0)Type GREATPETS in the Password box.
  7. Host String,
  8. MYDB
  9. Type MYDB in the Host Name box
  10. You are now connected to the database. Next, start the PL/SQL block by declaring two variables: one to store the value of the LOB and the other for the number of bytes to be erased.