Are Views automatically updated

前端 未结 6 1413
谎友^
谎友^ 2021-02-02 05:40

If I JOIN or CROSS APPLY two tables and create a VIEW, will the view automatically gets updated when I update either of the two tables or

6条回答
  •  悲&欢浪女
    2021-02-02 05:44

    Just adding on to @Curt's Answer, if the update you made to underlying tables is adding or deleting Data, then the view is auto updated with the new data. If you add or delete the columns form the underlying tables(basically the definition of the View ), then you need to run sp_RefreshView stored procedure to reflect the new schema in your view.

提交回复
热议问题