What is an updatable view, and what conditions must a view meet to allow inserts and updates through it?

Last updated 3 July 2026

  • An updatable view lets INSERT/UPDATE/DELETE pass through to the base table, but only if each view row maps unambiguously to one base-table row.

  • Typically it requires a single table and simple column references, with no aggregates, GROUP BY, DISTINCT, UNION, or window functions. Required NOT NULL columns without defaults must be exposed.

  • WITH CHECK OPTION blocks writes that would fall outside the view's filter. INSTEAD OF triggers enable writes to complex views.

  • https://sqlabhub.com/learn/views
  • https://oneuptime.com/blog/post/2026-03-31-mysql-update-data-through-view/view
  • https://dev.mysql.com/doc/search/?q=integer.html&d=201&p=18
  • https://dev.mysql.com/doc/refman/9.2/en/view-updatability.html
  • https://reintech.io/blog/sql-updatable-views-explained
  • https://www.postgresql.org/docs/current/sql-createview.html
  • https://www.rockdata.net/tutorial/ddl-updatable-views/
  • https://learn.microsoft.com/en-us/sql/relational-databases/views/modify-data-through-a-view?view=sql-server-ver17
All SQL interview questions