PL/SQL Datatypes  «Prev  Next»

PL/SQL Datatypes - Quiz

Each question is worth one point. Select the best answer or answers for each question.
 
1. Which identifier is valid?
Please select the best answer.
  A. customer_12
  B. loop
  C. customer@orgA
  D. 12customer

2. What is the value of customer_id within the nested block in the example below?
/* Start main block */
DECLARE
 customer_id NUMBER(9) := 678;
 credit_limit NUMBER(10,2) := 10000;
BEGIN
 /* Start nested block */
DECLARE
 customer_id VARCHAR2(9) := 'AP56';
 current_balance NUMBER(10,2) := 467.87;
BEGIN
-- what is the value of customer_id at this point?
  NULL; 
 END;
END;

Please select the best answer.
  A. 678
  B. 10000
  C. 'AP56'
  D. 467.87

3. For which task is it best to use a character string enclosed by double quotes?
Please select the best answer.
  A. Referring to a column in the database
  B. Using a reserved word to declare an identifier
  C. Using a hyphen to concatenate two columns
  D. Referring to a number variable by using a logical operator

4. What is the maximum number of exception handlers processed before the PL/SQL block is exited, provided an exception occurs?
Please select the best answer.
  A. None
  B. All exceptions that are referenced in the block
  C. One
  D. All exceptions that apply

5. Which functions can be used with any datatype?
Please select all the correct answers.
  A. SUM
  B. MIN
  C. MAX
  D. AVG



Oracle PL/SQL Programming