テーブルの更新
説明
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;