what is a trigger and types of triggers
Answers were Sorted based on User's Feedback
Answer / satty
trigger is a set of actions that will be executed or implemented , when a defined event occur. triggering events are 1.insert, 2.update, 3.delete
triggers can be defined for a specific table and once defined then it is automatically active.
triggers are used to do a data validation and to maintain data integrity.
types of triggers:
before trigger and an after trigger.
triggers information can be stored in the sysibm.systriggers
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / anitha
A trigger is a set of actions that are run automatically when a specified change operation is performed on a specified table. The change operation can be an SQL INSERT, UPDATE, or DELETE statement, or an insert, update, or delete high level language statement in an application program.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / anitha
A trigger is a set of actions that are run automatically when a specified change operation is performed on a specified table. The change operation can be an SQL INSERT, UPDATE, or DELETE statement, or an insert, update, or delete high level language statement in an application program
types of triggers.
• Before delete trigger
• Before insert trigger
• Before update trigger
• After delete trigger
• After insert trigger
• After update trigger
• Read only trigger (external trigger only)
| Is This Answer Correct ? | 0 Yes | 0 No |
before altering a table is it necessary to lock ? if lock what is it ? how to do ? ifi want to lock a table what is that command ?
what is the difference between join and union?
if there is a table with huge number of records and if i want to extract only first 3 records from the table, what query i have to provide to retreive first 3 records
Consider that a package is bound into 2 different collections and the PKLIST option specifies both the collections. If the collection id is not specified in the program while executing the SQL query, then when the DB2 system will search the package list, which collection will it pick up or will it give an error/abend?
what is the difference between normal select query and currosor
How many buffer pools are there in DB2?
How do you define a correlated name?
What is coalesce in db2?
What is syscat in db2?
What if we try to insert the base table through updatable view , but failed to give a column value which is defined as NOT NULL.
How do I add a column to an existing table in db2?
I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.