What is Global temporary table? and what are the benefits of it?
Latest Answer: The data in a global temporary table is private, such that data inserted by a session can only be accessed by that session. The session-specific rows in a global temporary table can be preserved for the whole session, or just for the current transaction. ...
begin For i in 1..5 loop insert into A values(i); savepoint 1; end loop; rollback to savepoint 1; commitend;--initially there are no data in table A. So my question is after execution of this
Latest Answer: The first mistake in this code is savepoint 1;You can't give 1 as identifier. Identifier name must begin with a letter.insert into A values(i);savepoint x;Here you are defining savepoint after inserting the value. So the final savepoint ...
Give an example for calling procedure with user and system exception
Latest Answer: Simple example for predefined exception CREATE OR REPLACE PROCEDURE TEST_PROC AS A NUMBER ; BEGIN A := 'TEST'; DBMS_OUTPUT.PUT_LINE('THE VALUE OF A = '||A); EXCEPTION WHEN VALUE_ERROR THEN DBMS_OUTPUT.PUT_LINE('The value of A should ...
How will implement the PL/SQL tables?
Latest Answer: - Pl/sql is in memory representation of a table.- It is just a data type. ( Collection type)- It may store any number of rows from table.Here is a simple exampleCREATE OR REPLACE PROCEDURE TEST_PROC ASTYPE EMP_TYPE IS TABLE OF EMP%ROWTYPE;EMP_VAR ...
can we issue rollback, commit in the trigger body. if we issue what is the result
Latest Answer: We can use commit and rollback in trigers using autonomous transactions.- An atonomous transaction is an independent transaction initiated by another transaction.- When an atonomous transaction is called the parent transaction is temporarly suspended.- ...
What exactly the difference between 'TABLE OF' and 'REF CURSOR' in PL/SQL?For what purposes these both might be used?
Latest Answer: A ref cursor is a dynamic cursor in which the contents of cursor can be changed dynamically at run time depending upon our requirement.A ref cursor is basically a data type. A variable declared based on such data type is called cursor variable. We can ...
how to pass result set using refcursor from one package procedure to another package procedure? and code also
Latest Answer: CREATE TABLE employees (empid NUMBER(5),empname VARCHAR2(30));INSERT INTO employees (empid, empname) VALUES (1, 'Dan Morgan');INSERT INTO employees (empid, empname) VALUES (2, 'Jack Cline');INSERT INTO employees (empid, empname) ...
Which two statements are true?A. A function must return a value.B. A procedure must return a value.C. A function executes a PL/SQL statement.D. A function is invoked as part of an expression.E. A procedure must have a return Data
Assume that I am using a temporary table in a procedure and I am inserting records and updating another set of records through Merge statement. If I use cursor in that temporary table, How can I extract
Latest Answer: Make sure you do not COMMIT* in the middle of the procedure. You can do any number of insertion into and deletion from temporary table and use "Select * from temp_table" to fetch available data. Do not preserve rows unless it is required ...
Latest Answer: A Table is a basic unit of storage in oracle.A nested table is a collection type. The main advantage of collections is instead of processing data sequentially, we may process all the date in one step.- It is a collection of rows stored ...
View page << Previous 1 2 3 [4] 5 6 7 8 9 10 Next >>

Go Top