GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Oracle  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 20 of 237    Print  
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.



  
Total Answers and Comments: 2 Last Update: July 05, 2007   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Sunil Yadav
 

To avoid the mutation table error ,the procedure should be declared as an AUTONOMOUS TRANSACTION.

By this the procedure will be treated as an separate identity.



Above answer was rated as good by the following members:
askvenki
October 26, 2005 01:38:17   #1  
Sunil Yadav        

RE: What happens if a procedure that update...

To avoid the mutation table error ,the procedure should be declared as an AUTONOMOUS TRANSACTION.

By this the procedure will be treated as an separate identity.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
July 05, 2007 03:22:28   #2  
rudra pratap        

RE: What happens if a procedure that update...

In order to avoid mutation table error we need to have a row level as well as a statment level trigger.


 
Is this answer useful? Yes | No

 Related Questions

 A set of related declarations and procedural statements is called block. 
Latest Answer : Component of PL/SQL Block are Declare(Optional), Begin(Mandatory), Exception(Optional), END(Mandatory). ...

 Some  scalar  data  types  such  as NUMBER, VARCHAR2, DATE, CHAR, LONG, BOOLEAN.Some composite data types such as RECORD & TABLE. 
Latest Answer : ScalarCHARVARCHAR2 LONGLONG RAWNUMBER [(precision, scale)]BINARY_INTEGERPLS_INTEGERBOOLEAN Composite TypesRECORDTABLEVARRAYLOB TypesBFILEBLOBCLOBNCLOBReference TypesREF CURSORREF object_type ...

 %  TYPE  provides  the data type of a variable or a database column to that variable. % ROWTYPE  provides the record type that represents a entire row of a table or view 
Latest Answer : %TYPE is used to declare a variable with the same type as that of a database table column.%ROWTYPE is used to declare a record as same type found in database table.These two provides data independence and allows you to adopt database changes due to new ...

 %  ROWTYPE  is to be used whenever query returns a entire row of a table or view. TYPE  rec  RECORD is to be used whenever query returns columns of differenttable or views 
Latest Answer : %ROWTYPE is used when you need to work with complete record.TYPE RECORD is used to create your own data type with specificed number of values to hold.Suppose If a table has 20 columns and you need to work with only seven columns . If I use %ROWTYPE, ...

 Objects  of  type  TABLE are called "PL/SQL  tables", which are modeled as (but  not the same as) database tables,  PL/SQL tables use a primary PL/SQL tables 
Latest Answer : Example for PL/SQL table:==================In the below block "typlsql" and "ty_plsql2" are PL/SQL tablesdeclaretype ty_plsql is record ( empno number, ename varchar2(50));TYPE ty_plsql2 is table of ty_plsql;ty_plsql1 ty_plsql2;j number;cursor ...

 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 : A trigger may be a 1. DML Trigger on tables2. Instead of triggers on views3. System triggers on database or schemaBased on the way it executes statements  triggers are of two types1. Statement leve trigger2.  Row level triggerA trigger fires ...

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  


 Sponsored Links

 
Related Articles

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Using Oracle XML DB Repository

Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
 

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

Performing XSLT Transformations inside the Database

Performing XSLT Transformations inside the Database Now that you have the employees XSL stylesheet stored in the database and the xmlusr schema is permitted to access the hr employees table you can create a script that will instruct the database to build an HTML page based on the data stored in hr e
 

Moving All the XML Processing into the Database

Moving All the XML Processing into the Database In the preceding example the database server performs only a part of the XML processing while the rest is still performed by the PHP engine Specifically the database server generates an employees XML document based on the records from the hr employees
 

Performing XML Processing inside the Database

Performing XML Processing inside the Database When building XML enabled applications on top of Oracle there are many advantages to performing the XML processing inside the database when compared to performing it on the client The key advantages to perform XML processing inside the database are as fo
 

XML Processing in PHP and Oracle Applications

Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
 

PHP Oracle Web Development

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
 

ODP.NET - Populating a Dataset with a Single Data Table

ODP NET Populating a Dataset with a Single Data Table A dataset is simply a group of data tables These data tables can be identified with their own unique names within a dataset You can also add relations between data tables available in a dataset mosgoogle The following code gives you the details o
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape