Exam 2: Basic PL/SQL Block Structures

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The ____ uses the LOOP and END LOOP markers to begin and end the loop code.

Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
Verified

A

Which of the following code fragments is correct?

Free
(Multiple Choice)
4.8/5
(41)
Correct Answer:
Verified

D

The BEGIN section of a PL/SQL block contains code that creates variables, cursors, and types. _________________________

Free
(True/False)
4.8/5
(38)
Correct Answer:
Verified

False

The LOOP statement is a mechanism that allows the checking of a condition to determine if statements should or should not be processed.

(True/False)
4.8/5
(36)

The basic loop uses the LOOP and END LOOP markers to begin and end the loop code. _________________________

(True/False)
4.9/5
(29)

When an IF statement checks only one condition and performs actions only if the condition is True, it is referred to as a simple IF condition.

(True/False)
4.7/5
(34)

The following loop iterates four times. BEGIN WHILE lv_cnt_num <= 5 LOOP DBMS_OUTPUT.PUT_LINE( lv_cnt_num ); lv_cnt_num := lv_cnt_num + 1; END LOOP; END;

(True/False)
4.9/5
(36)

The following code fragment is a correct example of the use of a FOR loop. BEGIN FOR i IN 1..5 DBMS_OUTPUT.PUT_LINE( i ); END LOOP; END;

(True/False)
4.8/5
(39)

FOR i IN 1..tbl_roast.COUNT LOOP lv_tot_num := lv_tot_num + tbl_roast(i); END LOOP; In the above code fragment, which of the following holds the value of the current iteration number?

(Multiple Choice)
4.8/5
(37)

A(n) scalar variable can hold only a single value. _________________________

(True/False)
4.8/5
(37)

Which of the following code fragments would not raise an error?

(Multiple Choice)
4.7/5
(33)

The keyword DEFAULT can be used in place of the := symbol to assign initial values to the variables within the declaration statement.

(True/False)
4.9/5
(40)

What is the purpose of the BEGIN section of a PL/SQL block?

(Essay)
4.8/5
(39)

DECLARE order NUMBER(2) := 4; Total_amt NUMBER(2); BEGIN Total_amt := order * 8; END; According to the statement block above, what value is stored in the variable total_amt?

(Multiple Choice)
4.9/5
(32)

The term anonymous blocks refers to blocks of code that are not stored for reuse and do not exist after being executed.

(True/False)
4.7/5
(41)

The DECLARE section of the PL/SQL block contains all the processing action, or programming logic. _________________________

(True/False)
4.7/5
(42)

An infinite loop causes a program to loop indefinitely, disrupting the ability of the code to continue with any processing beyond the loop.

(True/False)
4.7/5
(28)

Assignment statements are used to put or change the values of variables.

(True/False)
4.8/5
(31)

A(n) CASE expression evaluates conditions and returns a value in an assignment statement. _________________________

(True/False)
4.9/5
(29)

____ are named memory areas that hold values to allow the retrieval and manipulation of values in a program.

(Multiple Choice)
4.8/5
(38)
Showing 1 - 20 of 81
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)