REFRESH TABLE

描述

REFRESH TABLE 语句使给定表或视图的缓存条目(包括数据和元数据)失效。失效的缓存会在再次执行缓存表或与其关联的查询时以惰性方式填充。

语法

REFRESH [TABLE] table_identifier

参数

示例

-- The cached entries of the table will be refreshed  
-- The table is resolved from the current database as the table name is unqualified.
REFRESH TABLE tbl1;

-- The cached entries of the view will be refreshed or invalidated
-- The view is resolved from tempDB database, as the view name is qualified.
REFRESH TABLE tempDB.view1;