REFRESH TABLE
說明
REFRESH TABLE
陳述式會使快取的項目失效,其中包含給定表格或檢視的資料和元資料。當快取的表格或與其關聯的查詢再次執行時,會以延遲的方式填入失效的快取。
語法
REFRESH [TABLE] table_identifier
參數
-
table_identifier
指定表格名稱,為合格或不合格的名稱,用於指定表格/檢視。如果未提供資料庫識別碼,則是指目前的資料庫中的暫時檢視或表格/檢視。
語法:
[ database_name. ] table_name
範例
-- 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;