1. As with any other use of transactions - to ensure a collection of commands within the trigger are executed in a repeatable way in the event of failure.
2. To 'undo' the process that caused the trigger to fire. For example, the trigger might be doing some additional integrity checks and issuing a rollback to undo the initiating update/delete.
---------
AnswerCome to think of it, I have never seen a commit on triggers. Triggers as you know are a last line defense based on an action that was carried out by an insert,update or delete. Hence, since the trigger exists on the server, and is only fired if one of the above conditions are executed then it seems pointless to use a commit in the trigger. Also commit goes along nicely with transactions where you begin the transaction and if all is well then you issue a commit, else if the transaction fails, then you issue a rollback.You would have to have an "if" statement that says" IF an error occurs and the field is not updated (your code would be specific) then "rollback". You would want to name the section so you can rollback by name to be specific. If you did a generic rollback, all operations within the trigger would be rolled back--even the successful ones. If you put rollback statements within triggers, you need to make sure your logic is flawless and all bases are covered. You would want to test the trigger for the results you expect.
A SQL UPDATE statement allows the user to update existing records in a database table. For example, it could be used to update a customer's address, or a the price of a product.
Yes you can. You can create queries that do calculations. You can write code for programs to do calculations in a database. Doing calculations is a significant element of what you do with a database, so yes you can do them within a database.
A database is a collection of data. Data represents items that are stored within the database.
Yes, in SQL, you can use the SELECT statement along with mathematical operators like , -, , / to perform calculations on data in a database table. For example, you can add, subtract, multiply, or divide values from different columns or apply functions to calculate results. Just include the mathematical operation within the SELECT statement to perform the desired calculation.
relationship
A table is contained within the database and consists of columns and rows. A table is meant to store data and, in relational databases, are related to other tables within the same database.
Wether in docuement form or a database form within a database data input form a form within another form is called a sub form
Datafile is a group of files in each table space in an Oracle database. Database files are all files that are found within the database.
An internal database is a Computerized collections of information obtained from data sources within the company.
An internal database is a Computerized collections of information obtained from data sources within the company.
Filters-filters look for specific information within a database regarding a subject.