![]() Related Questions PL/SQL uses block structure as its basic structure. Anonymous blocks or nested blocks can be used in PL/SQL. Latest Answer : PL/SQL is a block-structured language, meaning that programs can be divided into logical blocks. A PL/SQL block consists of up to three sections: declarative (optional), executable (required), and exception handling (optional). ... There are two types of cursors, Implicit Cursor and Explicit Cursor.PL/SQL uses Implicit Cursors for queries.User defined cursors are called Explicit Cursors. They can be declared and Latest Answer : Cursors are of two types1. Implicit Cursors: - Whenever we execute sql statements oracle server assigns a work area called private sql area to store precessed infomation. The most recently used work are can be accessed using SQL%. In implicit cursors ... WHERE CURRENT OF clause in an UPDATE,DELETE statement refers to the latest row fetched from a cursor. Database Triggers Latest Answer : When referencing the current row from an explicit cursor, use the WHERE CURRENT OF clause. This allows you to apply updates and deletes to the row currently being addressed, without the need to explicitly reference the ROWID. You must include the FOR ... Database trigger is stored PL/SQL program unit associated with a specific database table. Usages are Audit data modifications, Latest Answer : A database trigger is a named pl/sql block associated with a table and fires automatically when an event occurs or something happens. Data auditing , Implementing complex business rules, security are main uses of database triggers. ... Insert Update Latest Answer : Triggers can be classified based on the below factors -(1) Trigger Event:INSERTUPDATEDELETE(2) Trigger Type:STATEMENT LevelROW Level(3) Trigger Timings:BEFOREAFTERINSTEAD OF ... Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ? Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ? Why ? It is not possible. As triggers are defined for each table, if you use COMMIT of ROLLBACK in a trigger, it The table columns are referred as OLD.column_name and NEW.column_name.For triggers related to INSERT only NEW.column_name values only available.For triggers related to UPDATE only OLD.column_name Latest Answer : OLD and NEW are two virtual tables available during database trigger execution.UPDATE statement has access to both old and new values.INSERT statement has access only to new values. Old values are NULL for insert statement.DELETE ... What happens if a procedure that updates a column of table X is called in a database trigger of the same table ? Mutation of table occurs. The PRAGMA EXECPTION_INIT tells the complier to associate an exception with an oracle error. To get an error message of a specific oracle error. e.g. PRAGMA EXCEPTION_INIT Latest Answer : PRAGMA EXCEPTION_INIT statement associate the declared exception with the standard Oracle server error number. PRAGMA EXCEPTION_INIT tells the compiler to associate an exception name with an Oracle error number. That allows you to refer to any internal ... Raise_application_error is a procedure of package DBMS_STANDARD which allows to issue an user_defined error messages from stored sub-program or database Latest Answer : You can use this procedure to issue user-defined error messages from stored subprograms.You can report errors to your application and avoid returning unhandled exceptions.Syntax: raise_application_error (error_number,message[, {TRUE | FALSE}]); ...
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||