1.
What is the meaning of PL?
Correct Answer
B. Procedural language
Explanation
A procedural language is a type of programming language that is based on a procedure or a sequence of steps. It focuses on the process of executing a program rather than the data that is being manipulated. In contrast to other types of languages, such as object-oriented or functional languages, procedural languages are more concerned with how a task is performed rather than the overall structure of the program. Therefore, the meaning of PL in this context refers to Procedural language.
2.
What is an exception in PL/SQL?
Correct Answer
A. The error handling part of PL/SQL
Explanation
An exception in PL/SQL refers to the error handling part of the language. In PL/SQL, exceptions are used to handle unexpected errors or exceptional conditions that may occur during program execution. When an exception is raised, the program flow is transferred to the exception handling section, where the appropriate action can be taken to handle the error. This can include displaying an error message, logging the error, or performing any necessary cleanup operations. Exceptions allow for more robust and controlled error handling in PL/SQL programs.
3.
What are the two types of exceptions?
Correct Answer
D. User_defined and predefined
Explanation
The correct answer is "User_defined and predefined." This answer correctly identifies the two types of exceptions in programming. User-defined exceptions are custom exceptions created by the programmer to handle specific error conditions in their code. Predefined exceptions, on the other hand, are exceptions that are already defined in the programming language and can be used to handle common error situations.
4.
Which of these is called a statement in PL/SQL?
Correct Answer
C. Procedure
Explanation
A procedure in PL/SQL is a named block of code that performs a specific task. It can be called or invoked by other PL/SQL blocks or programs. Procedures are used to encapsulate a series of SQL and PL/SQL statements, allowing them to be reused and modularized. Unlike functions, procedures do not return a value. They are commonly used for tasks such as data manipulation, data validation, and business logic implementation. Therefore, a procedure is considered a statement in PL/SQL.
5.
All of these rules applies to nulls while making comparisons except...
Correct Answer
C. Null can only be false
Explanation
This answer is correct because null can have three possible states: null, true, or false. Null is not limited to being only false, as it can also be true or simply null. Therefore, the statement "Null can only be false" is incorrect.
6.
How many data types are available in PL/SQL?
Correct Answer
C. 4
Explanation
PL/SQL, a procedural language used in Oracle databases, has four data types: NUMBER, VARCHAR2, DATE, and BOOLEAN. These data types allow for the storage and manipulation of different types of data within PL/SQL programs. Therefore, the correct answer is 4.
7.
What are the two types of cursor in PL/SQL?
Correct Answer
B. Implicit and Explicit cursor
Explanation
Implicit and Explicit cursors are the two types of cursors in PL/SQL. Implicit cursors are automatically created by the Oracle server for DML statements and are used to process SQL statements that are not explicitly declared. On the other hand, Explicit cursors are user-defined and are explicitly declared and used to process SQL statements in PL/SQL code. They offer more control and flexibility compared to Implicit cursors.
8.
Which of these activities all rows in a table when enabled?
Correct Answer
B. Constraints
Explanation
Constraints are used to define rules and restrictions on the data in a table. When enabled, constraints ensure that all rows in a table adhere to these rules. They can be used to enforce data integrity, such as ensuring that certain columns have unique values or that foreign key relationships are maintained. Therefore, when constraints are enabled, they apply to all rows in a table, making them the correct answer to the question.
9.
A table which is currently being changed by DML is called a...
Correct Answer
D. Mutating table
Explanation
A table which is currently being changed by DML is called a mutating table. This term is commonly used in database management systems to refer to a table that is being modified by an ongoing Data Manipulation Language (DML) operation, such as an INSERT, UPDATE, or DELETE statement. When a table is mutating, it means that its data is in a transitional state and cannot be accessed or modified by other concurrent transactions until the DML operation is completed. This is done to ensure data integrity and prevent conflicts or inconsistencies in the database.
10.
Variables which are declared in procedure headings and referenced in the procedure body are called...
Correct Answer
D. Formal parameters
Explanation
Formal parameters are variables that are declared in the procedure headings and referenced in the procedure body. They are used to pass values between the calling code and the called procedure. In other words, formal parameters act as placeholders for values that will be provided when the procedure is called.