REFRESH FUNCTIONREFRESH FUNCTION

使缓存的函数项(包括给定函数的类名和资源位置)无效。Invalidates the cached function entry, which includes a class name and resource location of the given function. 立即填充无效缓存。The invalidated cache is populated right away. 请注意,REFRESH FUNCTION 仅适用于永久函数。Note that REFRESH FUNCTION only works for permanent functions. 刷新本机函数或临时函数将导致异常。Refreshing native functions or temporary functions will cause an exception.

语法Syntax

REFRESH FUNCTION function_identifier

参数Parameters

  • function_identifierfunction_identifier

    函数名称(限定名称或非限定名称)。A function name, which is either a qualified or unqualified name. 如果未提供数据库标识符,则使用当前数据库。If no database identifier is provided, uses the current database.

    语法: [database_name.] function_nameSyntax: [database_name.] function_name

示例Examples

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

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