REFRESH FUNCTION

Description

REFRESH FUNCTION statement invalidates the cached function entry, which includes a class name and resource location of the given function. The invalidated cache is populated right away. 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

Examples

-- 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;