PL/SQL Language Elements - questions and answers

PL/SQL Language Elements - questions and answers


1) __________ is a numeric expression that must return a value of type PLS_INTEGER,BINARY_INTEGER, or a value implicitly convertible to that datatype.

A) index
B) indicator_name
C) field_name
D) host_variable_name
View Answer / Hide Answer

ANSWER: A) index




2) The AUTONOMOUS_TRANSACTION pragma changes the way a subprogram works within a transaction.

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




3) Pragmas are processed at ___________ .

A) Run time
B) Compile time
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: B) Compile time




4) For which of the following can pragma be applied?

A) Top-level (not nested) anonymous PL/SQL blocks
B) Local, standalone, and packaged functions and procedures
C) Methods of a SQL object type
D) Database triggers
E) All mentioned above
View Answer / Hide Answer

ANSWER: E) All mentioned above




5) Which keyword and parameter used for declaring an explicit cursor?

A) constraint
B) cursor_variable_declaration
C) collection_declaration
D) cursor_declaration
View Answer / Hide Answer

ANSWER: D) cursor_declaration




6) Which of the following declares an instance of an object type?

A) record_declaration
B) procedure_declaration
C) object_declaration
D) None of the above
View Answer / Hide Answer

ANSWER: C) object_declaration




7) Which statement chooses from a sequence of conditions, and executes a corresponding statement?

A) CASE Statement
B) CLOSE Statement
C) COMMIT Statement
D) None of the above
View Answer / Hide Answer

ANSWER: A) CASE Statement




8) Which statements execute a sequence of statements multiple times?

A) LOOP statement
B) NULL statement
C) MERGE statement
D) None of the above
View Answer / Hide Answer

ANSWER: A) LOOP statement




9) Which is a schema object that groups logically related PL/SQL types, items, and subprograms?

A) Package Declaration
B) Object_type declaration
C) Procedure declaration
D) None of the above
View Answer / Hide Answer

ANSWER: A) Package Declaration



Post your comment