<p><pre><code>  create trigger tgr_whatever
  INSTEAD OF {update,insert,delete} on some_complex_view
  [for each row]
  &lt;code goes here&gt;
</code></pre>
Sometimes, if you run a DML statement on a view, the database can figure out how to translate that into DML on the underlying tables.<p>Sometimes it can&#x27;t. In this case the view is not updateable, unless you define appropriate &quot;instead of&quot; triggers on it. Some databases allow you do define these as statement-level triggers, that is without the &quot;for each row&quot; part. In that case the trigger will be passed all of the affected rows at once.