O'Reilly logo

Oracle® PL/SQL® Interactive Workbook, Second Edition by Elena Silvestrova, Benjamin Rosenzweig

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3 General Programming Language Fundamentals

1)Write a PL/SQL block
  1. That includes declarations for the following variables:

    A VARCHAR2 data type that can contain the string ‘Introduction to Oracle PL/SQL’

    A NUMBER that can be assigned 987654.55, but not 987654.567 or 9876543.55

    A CONSTANT (you choose the correct data type) that is autoinitialized to the value ‘603D’

    A BOOLEAN

    A DATE data type autoinitialized to one week from today

  2. In the body of the PL/SQL block, put a DBMS_OUTPUT.PUT_LINE message for each of the variables that received an autoinitialization value.

  3. In a comment at the bottom of the PL/SQL block, state the value of your NUMBER data type.

A1: Answer: Your answer should look similar to the following:
 SET SERVEROUTPUT ON DECLARE ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required