In DB2, what happens when you update data through a view?

  • The data in the underlying table is updated, but the view remains unchanged
  • The database becomes corrupted and requires recovery
  • The update operation fails because views are read-only in DB2
  • The view is updated directly, and the changes are reflected in the underlying table
When you update data through a view in DB2, the update operation is applied directly to the underlying table, and the changes are reflected in both the table and the view. Views in DB2 can be updatable, meaning you can perform insert, update, and delete operations through them under certain conditions, such as the view being based on a single table and not containing certain constructs like aggregates or groupings. 
Add your answer
Loading...

Leave a comment

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