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;