PL SQL Practice Test 6
Whenever compiler implicitly converts the data type of the actual to formal parameter?
- When pass by reference
- Always, when pass by any method
- It never converts implicitly and has to be explicitly done by user
- When pass by value
Ans : 4
What are the two different types of values for a parameter?
- Default and System given
- Default and user given
- System given and user given
- Compile time and run time values
Ans : 2
What happens data type of the actual parameter is not same as formal parameter?
- An error is thrown.
- The parameter is skipped and not passed.
- Compiler performs an implicit conversion and if possible no error is thrown.
- The PL/SQL code abruptly terminates.
Ans : 3
How is the formal parameter treated when the mode of the parameter is IN OUT?
- Formal parameter acts like an uninitialized value.
- Formal parameter is initialized to the default value of its type
- Formal parameter acts like an initialized variable
- Formal parameter acts like a constant.
Ans : 3
What happens when we execute two subprograms that cannot be overloaded?
- Compile time error
- Compile time warning
- Run time error
- Run time warning
Ans : 1
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
How is a mixed notation used for matching formal and actual parameters?
- First two parameters is by position and others are by names
- Any number of parameters can be passed by position and the rest are passed by names
- First parameter is by position and others are by names
- Last parameter is by position and others are by names
Ans : 3
What happens when we specify parameters using named notations in wrong order?
- There is no wrong order while using named notations
- This can cause problems that are hard to detect.
- These problems are detected using PL/SQL compiler
- Run time errors are thrown when such a problem occurs
Ans : 1
What is result i. PROCEDURE s (p INTEGER) IS ii. PROCEDURE s (p REAL) IS …
- Successful
- Error because formal parameters differ only in mode
- Error because the name of the procedures are same
- Error because formal parameters differ only in subtype
Ans : 4
What are overloaded subprograms?
- Two or more subprograms that can have the same name with different parameter lists.
- Two subprograms that can have different name with different parameter lists.
- Two or more subprograms that can have the same name with same parameter lists.
- Two or more subprograms that can have different name with same parameter lists.
Ans : 1
Where can overloaded subprograms be used in PL/SQL?
- Anywhere in PL/SQL
- Inside an anonymous block only
- Inside the declaration section of a PL/SQL block or inside a package
- Inside a package only
Ans : 3
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Which of the following subprograms cannot be overloaded?
- Nested subprogram
- Standalone subprogram
- Package subprogram
- Nested and Package subprogram
Ans : 2
What is the statement to remove a procedure from a database?
- ALTER PROCEDURE
- DROP PROCEDURE
- DELETE PROCEDURE
- TRUNCATE procedure.
Ans : 2
Which is a procedural extension of Oracle- SQL language ?
- PQL
- Advanced SQL
- PL/SQL
- SQL
Ans : 3
Which subprogram is used to compute a value?
- Procedure
- Function
- Both A & B
- None of the above
Ans : 2
In which parameter mode Formal parameter acts like an initialized variable?
- IN
- OUT
- IN OUT
- None of the above
Ans : 3
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Which subprogram acts like new expressions and operators?
- Procedures
- Functions
- Both A & B
- None of the above
Ans : 2
Subprograms are named PL/SQL blocks that can be called with a set of parameters.
- True
- False
- Depends upon
- None of the above
Ans : 1
The variables or expressions passed from the calling subprogram are –
- Actual Parameters
- Formal Parameters
- Both A & B
- None of the above
Ans : 1
Which statement lets you create standalone functions that are stored Database?
- CREATE PROCEDURE
- CREATE FUNCTION
- Both A & B
- None of the above
Ans : 2
A recursive subprogram is one that calls itself.
- True
- False
- Depends upon
- None of the above
Ans : 1
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Which of the following is a way of passing parameters to PL/SQL subprograms?
- Positional notation
- Named notation
- Mixed notation
- All of the above.
Ans : 4
How many ways we can execute a procedure?
- 3
- 0
- 4
- 2
Ans : 1
What are the three parameter modes for procedures?
- IN, OUT, IN OUT
- Read, Write, Append
- CONSTANT, VARIABLE, DEFAULT
- COPY, NO COPY, REF
Ans : 1
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Read More PL/SQL Objective Questions and Answers