Name three types of variables used in PL/SQL. Where are they declared? Give a sample declaration of each.

What will be an ideal response?


Host/bind variable – declared at SQL> prompt, used in PL/SQL block with : prefix
SQL> VARIABLE num NUMBER
Local variable – declared in declaration section of PL/SQL block under keyword
DECLARE.
DECLARE
V_num NUMBER(2);

Substitution varaible – does not need declaration, used with & prefix.

Computer Science & Information Technology

You might also like to view...

The contents of a paragraph element are not

(a) preceded by a vertical space. (b) followed by a vertical space. (c) left-justified by default. (d) indented.

Computer Science & Information Technology

Images inserted into a placeholder will be sized to fit

Indicate whether the statement is true or false

Computer Science & Information Technology

The if modifier is used to create complex conditional evaluations spread out over multiple lines.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Which of the following are not position-oriented ADTs?

a. bag b. stack c. list d. queue

Computer Science & Information Technology