Sie sind auf Seite 1von 3

Quiz: Using Variables in PL/SQL 1. Evaluate the following declaration. Determine whether or not it is lega l.

DECLARE test NUMBER(5); Mark for Review (1) Points legal (*) illegal 2. Evaluate the following declaration. Determine whether or not it is lega l. DECLARE name,dept VARCHAR2(14); Mark for Review (1) Points legal illegal (*)

Incorrect. Refer to Section 2 Lesson 1. 3. After they are declared, variables can be used only once in an applicat ion. True or False? Mark for Review (1) Points True False (*)

Correct 4. A function called FORMAT_TODAYS_DATE accepts no parameters and returns today's date in the format: Month DD, YYYY The following anonymous block invokes the function: DECLARE v_today DATE; BEGIN -- invoke the function here Which of the following statements correctly assigns the date variable v_today to the value returned by the format_todays_date function? Mark for Review (1) Points format_todays_date := v_today('Month DD, YYYY');

v_today := format_todays_date ('Month DD, YYYY'); v_today := format_todays_date(v_today); v_today := TO_DATE(format_todays_date, 'Month DD, YYYY'); (*)

Incorrect. Refer to Section 2 Lesson 1. 5. Constants must be initialized. True or False? Mark for Review (1) Points True (*) False

Correct 6. Which of the following are required when declaring a variable? (Choose two.) Mark for Review (1) Points (Choose all correct answers) Identifier name (*) CONSTANT Data type (*) NOT NULL

Incorrect. Refer to Section 2 Lesson 1. 7. Examine the following variable declarations: DECLARE v_number NUMBER := 10; v_result NUMBER; Which of the following correctly assigns the value 50 to V_RESULT? Review (1) Points v_result := v_number * 5; v_result := 100 / 2;

Mark for

v_result := ROUND(49.77); All of the above. (*)

Incorrect. Refer to Section 2 Lesson 1. Section 2 Lesson 1 8. Review (1) Points True (*) False Variables may be reused. True or False? Mark for

Correct

Das könnte Ihnen auch gefallen