You can't create a view as an
Update
, you need to create the view as a
Select
.
You can only perform the
Update
,
Delete
and
Insert
if the view
Select
contains one table:
Create View MyView As
SELECT * Customers WHERE Age > 18
Create View MyView As
SELECT * Customers, CustomerAddress WHERE Age > 18
and
customer.Id = CustomerAddress.Id
Additionally, you can only perform an insert where enough columns in the view are specified to satisfy any not null constraints.
As a side note, it looks like you are trying to set default values in your question, is this really what you want instead?
[Corrected code formatting]