Using PL/SQL Subprograms - questions and answers
Using PL/SQL Subprograms - questions and answers
1) Subprograms are named PL/SQL blocks that can be called with a set of parameters.A) True
B) False
View Answer / Hide Answer2) PL/SQL has two types of subprograms, procedures and functions. Which subprogram is used to compute a value?A) Procedure
B) Function
C) Both A & B
D) None of the above
View Answer / Hide Answer3) Which statement lets you create standalone functions that are stored in an Oracle database?A) SQL CREATE PROCEDURE
B) SQL CREATE FUNCTION
C) Both A & B
D) None of the above
View Answer / Hide AnswerANSWER: B) SQL CREATE FUNCTION
4) Subprograms let you extend the PL/SQL language. Which subprogram acts like new expressions and operators?A) Procedures
B) Functions
C) Both A & B
D) None of the above
View Answer / Hide Answer5) In which subprogram a RETURN statement does not return a value and so cannot contain an expression?A) In Procedures
B) In Functions
C) Both A & B
D) None of the above
View Answer / Hide Answer6) The variables or expressions passed from the calling subprogram are -A) Actual Parameters
B) Formal Parameters
C) Both A & B
D) None of the above
View Answer / Hide AnswerANSWER: A) Actual Parameters
7) In which of the following, do you specify the same parameters in the same order as they are declared in the procedure?A) Positional notation
B) Named notation
C) Mixed notation
D) All mentioned above
View Answer / Hide AnswerANSWER: A) Positional notation
8) Which parameter acts like a constant inside the subprogram?A) IN
B) OUT
C) Both A & B
D) None of the above
View Answer / Hide Answer9) In which mode parameter lets you pass values to the subprogram being called? It cannot be assigned a value.A) Using the IN mode
B) Using the OUT mode
C) Both A & B
D) None of the above
View Answer / Hide AnswerANSWER: A) Using the IN mode
10) In which parameter mode Formal parameter acts like an initialized variable?A) IN
B) OUT
C) IN OUT
D) None of the above
View Answer / Hide Answer11) To call a subprogram directly, users must have the EXECUTE privilege on that subprogram. By granting the privilege, you allow a user to - A) Call the subprogram directly
B) Compile functions and procedures that call the subprogram
C) Both A & B
D) None of the above
View Answer / Hide Answer12) A recursive subprogram is one that calls itself.A) True
B) False
View Answer / Hide Answer13) Which is a database object that groups logically related PL/SQL types, objects and subprograms?A) Package
B) Module
C) Body
D) Name
View Answer / Hide Answer14) Which of the following provides a way for your program to select multiple rows of data from the database and then process each row individually.A) PL/SQL Cursors
B) PL/SQL Trigger
C) PL/SQL Select
D) PL/SQL Process
View Answer / Hide AnswerANSWER: A) PL/SQL Cursors
15) Which of the following is used to define code that is executed / fired when certain actions or event occur?A) Replace
B) Keyword
C) Trigger
D) Cursor
View Answer / Hide Answer16) Which is a procedural extension of Oracle- SQL that offers language constructs similar to those in imperative programming languages?A) PQL
B) Advanced SQL
C) PL/SQL
D) SQL
View Answer / Hide Answer17) Which of the following combines the data manipulating power of SQL with the data processing power of Procedural languages?A) PQL
B) Advanced SQL
C) PL/SQL
D) SQL
View Answer / Hide Answer18) What is the maximum number of triggers that can apply to a single table?A) 14
B) 10
C) 12
D) 16
View Answer / Hide Answer