What is REF CURSOR (or) CURSOR VARIABLE (or) DYNAMIC CURSOR?Īnswer: Oracle 7.2 introduced ref cursor, This is a user-defined type which is used to process multiple records and also this is a record by record process. ( Elearning Portal)Īnswer: Flashback query is handle by Database Administrator only flashback queries along allows the content of the table to be retrieved with reference to a specific point of time by using as of clause that is flashback queries retrieves accidental data after committing the transaction also.įlashback queries generally use undo file that is flashback queries retrieve old data before committing the transaction oracle to provide two methods for flashback queries.ġ0. P-code is stored in the database for named blocks and is used the next time it is executed. P-code is a list of instructions for the PL/SQL engine. When all errors are corrected, a storage address is assigned to the variables that hold data. Syntax checking checks the PL/SQL codes for compilation errors. How is the process of PL/SQL compiled?Īnswer: Compilation process includes syntax check, bind, and p-code generation processes. The cursor is required to process rows individually for queries.Ĩ. A cursor can hold more than one row but can process only one row at a time. This temporary work area stores the data retrieved from the database and manipulate this data. A cursor contains information on a select statement and the row of data accessed by it. What is the cursor and why it is required?Īnswer: A cursor is a temporary work area created in system memory when an SQL statement is executed. A Rollback command is however used to undo the modifications done by the DML commands previously.ħ. What is the difference between a Rollback Command and a Commit Command?Īnswer: A Commit command is used to save the current transaction in the database in which modification is done to the database using Database Manipulation Language (DML) commands. What are the different Loop Control Structures used in PL/SQL?Īnswer: The different Loop Control Structures in PL/SQL are as follows:Ħ. Hence, Joins can be an alternative to Cursors.ĥ. What are the disadvantages of Cursors and is there any alternative to it?Īnswer: The processing of Cursors is very slow as compared to Joins. For this, the command is set server output on.Ĥ. For this to work properly and display the output on the console screen, we need to first set the server output to ON state.
We generally do it using dbms_output.put_line() function. What is set server output function used for in PL/SQL?Īnswer: In PL/SQL, we frequently require to produce the Output on the console.
How can you Rollback a particular part of a procedure or any PL/SQL Program?Īnswer: It can be done using Savepoints during the definition of a PL/SQL program.ģ.
Answer: Oracle PL/SQL is a procedural language that has both interactive SQL and procedural programming language constructs such as iteration, conditional branching.Ģ.