Question:- Why are Database Links Used?
Answer:- Database links are used to establish communication across multiple databases or environments such as test, development, and production. Other information can also be accessed using database links, which are read-only.
Question:- What is a Stored Procedure?
Answer:- A stored procedure is a sequence of statements or a named PL/SQL block that performs one or more specific functions. It is similar to a procedure in other programming languages. It is stored in the database and can be repeatedly executed. It is stored as a schema object and can be nested, invoked, and parameterized.
Question:- What is the Overloading of a Procedure?
Answer:- When the name of the same procedure is repeated with the parameters of different data types and parameters in different places, then that is referred to as procedure overloading.
Question:- What is meant by Expressions?
Answer:- Expressions are made up of a series of literals and variables that are separated by operators. Operators are used in PL/SQL to manipulate, compare, and calculate data. Expressions are made up of two parts, operators and operands.
Question:- Which Cursor Attributes are the Result of a Saved DML Statement, when it is Executed?
Answer:- The statement’s result is saved in four cursor attributes. The four attributes are: • SQL% FOUND • SQL% NOTFOUND • SQL% ROWCOUNT • SQL% ISOPEN
Question:- What is a Cursor? Why is it Required?
Answer:- A cursor is a temporary work area that is created in system memory when an SQL statement is executed. A cursor contains information on a select statement and the row of data accessed by it. This temporary work area stores the data, which is retrieved from the database, to manipulate it. A cursor can hold more than one row but can process only one row at a time. A cursor is required to process rows individually for queries.
Question:- What are the Types of Cursors?
Answer:- There are two types of cursors: • Implicit Cursor: When PL/SQL executes an SQL statement, it automatically constructs a cursor without specifying one; these cursors are known as implicit PL/SQL uses implicit cursors for the following statements: • INSERT • UPDATE • DELETE • SELECT • Explicit Cursor: A programmer declares and names an explicit cursor for the queries that return more than one row. An explicit cursor is a SELECT statement that is declared explicitly in the current block’s declaration section or in a package definition. The following are the commands that are used for explicit cursors in PL/SQL: • OPEN • FETCH • CLOSE
Question:- What is the Open Cursor Command Function?
Answer:- When the OPEN cursor command is used to open a cursor, it performs the following operations: • Set aside a processing memory region • Paese the statement SELECT • Use the memory addresses to assign values to input variables • Recognize the active set of rows that meet the selection criteria • Place the pointer exactly before the active set’s first row
Question:- How to Delete a Trigger?
Answer:- To delete a trigger, you need to use the command DROP TRIGGER.
Question:- What are the Advantages of Stored Procedures?
Answer:- Stored procedures have various advantages to help you design sophisticated database systems. Some of the advantages of stored procedures as listed below: • Better performance • Higher productivity • Ease of use • Increased scalability • Interoperability • Advance security • Replication
Question:- What are the Various Types of Schema Objects that can be Created by PL/SQL?
Answer:- There are various types of schema objects that are created by PL/SQL. Some of them are mentioned below: • Stored procedures, packages, and functions • Object tables, object types, and object views • Database triggers • Database links • Cursors • Table • View
Question:- What is the Advantage of Implicit Records?
Answer:- Implicit records are handy since they do not require hard-coded descriptions. Because implicit records are based on database table records, any changes to the database table records will be reflected in the implicit records automatically.
Question:- What are the Ways of Commenting in PL/SQL?
Answer:- In PL/SQL, comments help readability by describing the purpose and function of code portions. Two types of comments are available in PL/SQL. They are as follows: • Single-line Comments: Single-line comments start with a double hyphen (- -) at the beginning of a line and go all the way to the conclusion. • Multi-line Comments: Multi-line comments start with a slash-asterisk (/*) and terminate with an asterisk-slash (*/), and they can span across several lines.
Question:- What is %TYPE?
Answer:- The %TYPE property is used to declare a column in a table that includes the value of that column. The variable’s data type is the same as the table’s column.
