刷新函数

描述

REFRESH FUNCTION 语句会使给定函数的缓存函数入口(包括类名和资源位置)失效。失效的缓存会立即重新填充。请注意,REFRESH FUNCTION 仅适用于永久函数。刷新原生函数或临时函数会导致异常。

语法

REFRESH FUNCTION function_identifier

参数

示例

-- The cached entry of the function will be refreshed
-- The function is resolved from the current database as the function name is unqualified.
REFRESH FUNCTION func1;

-- The cached entry of the function will be refreshed
-- The function is resolved from tempDB database as the function name is qualified.
REFRESH FUNCTION db1.func1;