REFRESH TABLE
説明
REFRESH TABLE ステートメントは、指定されたテーブルまたはビューのデータとメタデータを含むキャッシュされたエントリを無効にします。無効化されたキャッシュは、キャッシュされたテーブルまたはそれに関連付けられたクエリが再度実行されたときに、遅延的に(lazy manner)設定されます。
構文
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;