Having Updatable Views that obey initial select conditions Let's say I have a table like this:
+--------------+----------+-------------+
| name         | is       | in          |
|--------------+----------+-------------|
| Study        | &lt;null&gt;   | &lt;null&gt;      |
| Sport        | &lt;null&gt;   | &lt;null&gt;      |
| Biology      | Study    | &lt;null&gt;      |
| Linguistics  | Study    | &lt;null&gt;      |
| Art          | &lt;null&gt;   | &lt;null&gt;      |
+--------------+----------+-------------+

And I want to build a view as such:
CREATE VIEW v AS SELECT name FROM t WHERE &quot;is&quot; = 'Study';

Now if I want to insert into this view, it does not automatically set &quot;is&quot; to 'Study', I have to write a trigger and a function to adjust this behavior. However, this is a highly repeated pattern in my application, and I was wondering if there is a way to automatically achieve this (an updatable view that obeys the select condition).
maybe it works, it is in SQL server but concept maybe the same in your case:
If its always required you can set default. It will update always when you insert the view [is] with 'Study':
ALTER TABLE t ADD CONSTRAINT  df_is DEFAULT 'Study' FOR [is];

Or you can create another view only for insert:
CREATE VIEW v_insert AS SELECT name,[is] FROM t WHERE [is] = 'Study';
DECLARE @is NVARCHAR(max)='Study';
INSERT INTO dbo.v_insert (name, [is]) VALUES ('nametoinsert', @is )