If I update a view, will my original tables get updated

前端 未结 3 950
無奈伤痛
無奈伤痛 2020-12-30 19:20

Hypothetically I have two tables Employee and Locations. Additionaly I have a view viewEmpLocation which is made by joining Employee and Locations.

If I update the v

3条回答
  •  臣服心动
    2020-12-30 19:44

    Yes.

    The data "in" a view has no existence independent from the tables that make up the view. The view is, in essence, a stored SELECT statement that masquerades as a table. The data is stored in the original tables and only "assembled" into the view when you want to look at it. If the view is updateable (not all views are) the updates are applied to the table data.

提交回复
热议问题