In order to test your progress, you should be able to answer the following questions.
If a variable is declared as follows , what are the results?
v_fixed_amount CONSTANT NUMBER;
_____ A NUMBER variable called v_fixed_amount has been declared (it will remain as a constant once initialized ).
_____ A NUMBER variable called v_fixed_amount has been declared (it will remain as null).
_____ An error message will result because constant initialization must be done in the executable section of the block.
_____ An error message will result because the declaration for the CONSTANT is missing an assignment to a NUMBER.
Which of the following are valid character types for PL/SQL?
_____ English letters
_____ Paragraph returns
_____ Arithmetic symbols
_____ Japanese Kanji
A variable may be used for which of the following?
_____ To hold a constant, such as the value of p
_____ To hold the value of a counter that keeps changing
_____ To place a value that will be inserted into the database
_____ To hold onto the function of an operand
_____ To hold any value as long as you declare it
Which of the following will declare a variable that is of the identical data type as the student_id in the database table STUDENT in the CTA database?
_____ v_id student_id := 123;
_____ v_id binary integer;
_____ v_id number NUMBER := 24;
_____ v_id student_id%type;
The value of a variable is set to null after the 'end;' of the block is issued.
Answers appear in Appendix A, Section 3.1 .