What are two virtual tables available during database trigger execution ?

1 Answer

Answer :

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
NEW.column_name values only available.
For triggers related to DELETE only OLD.column_name values only
available.

Related questions

Description : At what point of report execution is the before Report trigger fired?

Last Answer : After the query is executed but before the report is executed and the records are displayed.

Description : Is the After report trigger fired if the report execution fails?

Last Answer : Yes.

Description : Can U disable database trigger? How?

Last Answer : Yes. With respect to table ALTER TABLE TABLE [[ DISABLE all_trigger ]]

Description : Can you use a commit statement within a database trigger?

Last Answer : No

Description : What is Database Trigger ?

Last Answer : A Database Trigger is procedure (set of SQL and PL/SQL statements) that is automatically executed as a result of an insert in,update to, or delete from a table.

Description : What are the uses of Database Trigger ?

Last Answer : Database triggers can be used to automatic data generation, audit data modifications, enforce complex Integrity constraints, and customize complex security authorizations.

Description : What is a database trigger ? Name some usages of database trigger ?

Last Answer : Database trigger is stored PL/SQL program unit associated with a specific database table. Usages are Audit data modifications, Log events transparently, Enforce complex business rules Derive column values automatically, Implement complex security authorizations. Maintain replicate tables.

Description : Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ? Why ?

Last Answer : It is not possible. As triggers are defined for each table, if you use COMMIT of ROLLBACK in a trigger, it affects logical transaction processing.

Description : What is WHEN-Database-record trigger?

Last Answer : Fires when oracle forms first marks a record as an insert or an update. The trigger fires as soon as oracle forms determines through validation that the record should be processed by the next post or ... the first item in the record, and after the operator attempts to navigate out of the item.

Description : What is database Trigger?

Last Answer : A database trigger is a PL/SQL block that can defined to automatically execute for insert, update, and delete statements against a table. The trigger can e defined to execute once for the ... define database triggers. A database trigger can call database procedures that are also written in PL/SQL.

Description : What are the dictionary tables used to monitor a database space?

Last Answer : DBA_FREE_SPACE DBA_SEGMENTS DBA_DATA_FILES.

Description : What are the dictionary tables used to monitor a database spaces ?

Last Answer : DBA_FREE_SPACE DBA_SEGMENTS DBA_DATA_FILES.

Description : What is a Virtual Private Database? (for DBA

Last Answer : Oracle 8i introduced the notion of a Virtual Private Database (VPD). A VPD offers Fine-Grained Access Control (FGAC) for secure separation of data. This ensures that users only have ... the DBMS_RLS (Row Level Security) package. Select from SYS.V$VPD_POLICY to see existing VPD configuration.

Description : What strategies are available for backing-up an Oracle database? (for DBA

Last Answer : The following methods are valid for backing-up an Oracle database: Export/Import - Exports are "logical" database backups in that they extract logical definitions and data from the database to a file. ... , etc. If your database is in ARCGIVELOG mode, you also need to backup archived log files.

Description : When the form is running in DEBUG mode, If you want to examine the values of global variables and other form variables, What package procedure command you would use in your trigger text ?

Last Answer : Break. SYSTEM VARIABLES

Description : Which trigger related to mouse?

Last Answer : When-Mouse-Click When-Mouse-DoubleClick When-Mouse-Down When-Mouse-Enter When-Mouse-Leave When-Mouse-Move When-Mouse-Up

Description : What is transactional trigger property?

Last Answer : Identifies a block as transactional control block. i.e. non - database block that oracle forms should manage as transactional block.(NON- ORACLE datasource) default - FALSE.

Description : If you have property class attached to an item and you have same trigger written for the item . Which will fire first?

Last Answer : Item level trigger fires , If item level trigger fires, property level trigger won't fire. Triggers at the lowest level are always given the first preference. The item level trigger fires first and then the block and then the Form level trigger.

Description : What are property classes ? Can property classes have trigger?

Last Answer : Property class inheritance is a powerful feature that allows you to quickly define objects that conform to your own interface and functionality standards. Property classes also allow you to make global ... all objects that inherit properties from that class. Yes . All type of triggers .

Description : Which trigger are created when master -detail rela?

Last Answer : master delete property * NON-ISOLATED (default) a) on check delete master b) on clear details c) on populate details * ISOLATED a) on clear details b) on populate details * CASCADE a) per-delete b) on clear details c) on populate details

Description : What is a Trigger ?

Last Answer : A piece of logic that is executed at or triggered by a SQL *forms event.

Description : What is the difference between a Function Key Trigger and Key Function Trigger ?

Last Answer : Function key triggers are associated with individual SQL*FORMS function keys You can attach Key function triggers to 10 keys or key sequences that normally do not perform any SQL * FORMS operations. These keys referred as key F0 through key F9.

Description : What does an on-clear-block Trigger fire?

Last Answer : It fires just before SQL * forms the current block.

Description : Can we use GO-BLOCK package in a pre-field trigger ?

Last Answer : No

Description : Is a Key startup trigger fires as result of a operator pressing a key explicitly ?

Last Answer : No

Description : Can we use a restricted package procedure in ON-VALIDATE-FIELD Trigger ?

Last Answer : No

Description : What is the difference between an ON-VALIDATE-FIELD trigger and a trigger ?

Last Answer : On-validate-field trigger fires, when the field Validation status New or changed. Post-field-trigger whenever the control leaving form the field, it will fire.

Description : A query fetched 10 records How many times does a PRE-QUERY Trigger and POST-QUERY Trigger will get executed ?

Last Answer : PRE-QUERY fires once. POST-QUERY fires 10 times.

Description : When is PRE-QUERY trigger executed ?

Last Answer : When Execute-query or count-query Package procedures are invoked.

Description : What is the difference between ON-VALIDATE-FIELD trigger and a POST-CHANGE trigger ?

Last Answer : When you changes the Existing value to null, the On-validate field trigger will fire post change trigger will not fire. At the time of execute- query post-change trigger will fire, on-validate field trigger will not fire.

Description : What are the trigger associated with image items?

Last Answer : When-image-activated fires when the operators double clicks on an image itemwhen-image-pressed fires when an operator clicks or double clicks on an image item

Description : What is trigger associated with the timer?

Last Answer : When-timer-expired.

Description : Does a Before form trigger fire when the parameter form is suppressed?

Last Answer : Yes.

Description : Give the two types of tables involved in producing a star schema and the type of data they hold.

Last Answer : Fact tables and dimension tables. A fact table contains measurements while dimension tables will contain data that will help describe the fact tables.

Description : What is the use of TABLES option in EXP command ?

Last Answer : List of tables should be exported.ze)

Description : A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables?

Last Answer : Disable the foreign key constraint to the parent, drop the table, re- create the table, enable the foreign key constraint.

Description : What are mutating tables

Last Answer : When a table is in state of transition it is said to be mutating. eg :: If a row has been deleted then the table is said to be mutating and no operations can be done on the table except select.

Description : What is the difference between deleting and truncating of tables

Last Answer : Deleting a table will not remove the rows from the table but entry is there in the database dictionary and it can be retrieved But truncating a table deletes it completely and it cannot be retrieved.

Description : What is in all those X$ tables? (for DBA

Last Answer : The following list attempts to describe some x$ tables. The list may not be complete or accurate, but represents an attempt to figure out what information they contain. One should generally not ... Fixed Table. It can predict the potential loss of decreasing the number of database buffers. The

Description : Can cursor variables be stored in PL/SQL tables.If yes how. If not why?

Last Answer : No, a cursor variable points a row which cannot be stored in a two- dimensional PL/SQL table.

Description : Name the tables where characteristics of Package, procedure and functions are stored ?

Last Answer : User_objects, User_Source and User_error.

Description : How will you estimate the space required by a non- clustered tables?

Last Answer : Calculate the total header size Calculate the available dataspace per data block Calculate the combined column lengths of the average row Calculate the total average row size. Calculate the average number rows ... add 10 % additional space to calculate the initial extent size for a working table.

Description : How does one get the view definition of fixed views/tables?

Last Answer : Query v$fixed_view_definition. Example: SELECT * FROM v$fixed_view_definition WHERE view_name='V$SESSION';

Description : Spurious tuples may occur due to i. Bad normalization ii. Theta joins iii. Updating tables from join a) i& ii b) ii & iii c) i& iii d) ii & iii

Last Answer : a) i& ii b) ii & iii

Description : Tables derived from the ERD

Last Answer : a) Are totally unnormalised b) Are always in 1NF c) Can be further denormalised d) May have multi-valued attributes (b) Are always in 1NF

Description : How do you move tables from one tablespace to another tablespace?

Last Answer : There are several methods to do this; 1) export the table, drop the table, create the table definition in the new tablespace, and then import the data (imp ignore=y). 2) Create ... table and rename the temporary table as the original: DROP TABLE real_table; RENAME temp_name TO real_table;

Description : Can you make collection of Statistics for tables automatically?

Last Answer : YES. Oracle databse has default, scheduled job "gather_stats_job" that analyses stats on a daily basis during the maintenance window time. There are two scheduled activities related to ... GATHER_STATS_JOB'); Oracle collects optimizer statistics for SQL via the default of autostats_target = auto.

Description : Name the seven types of Oracle tables

Last Answer : Heap Organized Tables, Index Organized Tables, Index Clustered Tables, Hash Clustered Tables, Nested Tables, Global Temporary Tables, Object Tables.

Description : What is Execution Plan ?

Last Answer : The combinations of the steps the optimizer chooses to execute a statement is called an execution plan.

Description : Give the sequence of execution of the various report triggers?

Last Answer : Before form , After form , Before report, Between page, After report.