In DB2, what is the main function of triggers?

  • To automatically execute a set of SQL statements in response to specific events
  • To manage database security
  • To optimize query performance
  • To store large volumes of data
Triggers in DB2 are primarily used to automatically execute a set of SQL statements in response to specific events occurring on a table or view. These events can include insertions, updates, or deletions of data, and triggers enable developers to enforce business rules, maintain data integrity, and implement complex data validation logic within the database itself. 
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *