Aracılığıyla paylaş


UserDefinedFunction Class

The UserDefinedFunction object represents a SQL Server user-defined function.

Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Bildirim
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None Or AutomatedPolicyEvaluationMode.Enforce Or AutomatedPolicyEvaluationMode.CheckOnChanges Or AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<StateChangeEventAttribute("CREATE_FUNCTION", "FUNCTION")> _
<StateChangeEventAttribute("ALTER_FUNCTION", "FUNCTION")> _
<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)> _
<StateChangeEventAttribute("RENAME", "FUNCTION")> _
Public NotInheritable Class UserDefinedFunction
    Inherits ScriptSchemaObjectBase
    Implements ICreatable, IAlterable, IRenamable, IDroppable, _
    IExtendedProperties, IScriptable, ITextObject, IColumnPermission, IObjectPermission
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule)] 
[StateChangeEventAttribute("CREATE_FUNCTION", "FUNCTION")] 
[StateChangeEventAttribute("ALTER_FUNCTION", "FUNCTION")] 
[PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)] 
[StateChangeEventAttribute("RENAME", "FUNCTION")] 
public sealed class UserDefinedFunction : ScriptSchemaObjectBase, ICreatable, IAlterable, IRenamable, 
    IDroppable, IExtendedProperties, IScriptable, ITextObject, IColumnPermission, 
    IObjectPermission
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::None|AutomatedPolicyEvaluationMode::Enforce|AutomatedPolicyEvaluationMode::CheckOnChanges|AutomatedPolicyEvaluationMode::CheckOnSchedule)] 
[StateChangeEventAttribute(L"CREATE_FUNCTION", L"FUNCTION")] 
[StateChangeEventAttribute(L"ALTER_FUNCTION", L"FUNCTION")] 
[PhysicalFacetAttribute(PhysicalFacetOptions::ReadOnly)] 
[StateChangeEventAttribute(L"RENAME", L"FUNCTION")] 
public ref class UserDefinedFunction sealed : public ScriptSchemaObjectBase, ICreatable, IAlterable, IRenamable, 
    IDroppable, IExtendedProperties, IScriptable, ITextObject, IColumnPermission, 
    IObjectPermission
/** @attribute EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule) */ 
/** @attribute StateChangeEventAttribute("CREATE_FUNCTION", "FUNCTION") */ 
/** @attribute StateChangeEventAttribute("ALTER_FUNCTION", "FUNCTION") */ 
/** @attribute PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly) */ 
/** @attribute StateChangeEventAttribute("RENAME", "FUNCTION") */ 
public final class UserDefinedFunction extends ScriptSchemaObjectBase implements ICreatable, IAlterable, 
    IRenamable, IDroppable, IExtendedProperties, IScriptable, ITextObject, 
    IColumnPermission, IObjectPermission
EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule) 
StateChangeEventAttribute("CREATE_FUNCTION", "FUNCTION") 
StateChangeEventAttribute("ALTER_FUNCTION", "FUNCTION") 
PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly) 
StateChangeEventAttribute("RENAME", "FUNCTION") 
public final class UserDefinedFunction extends ScriptSchemaObjectBase implements ICreatable, IAlterable, 
    IRenamable, IDroppable, IExtendedProperties, IScriptable, ITextObject, 
    IColumnPermission, IObjectPermission

Remarks

The UserDefinedFunction object provides functionality that allows users to programmatically manage functions.

To get UserDefinedFunction object properties, users can be a member of the public fixed server role.

To set UserDefinedFunction object properties, users must have ALTER permission on the user-defined function.

To create a user-defined function, users must have CREATE FUNCTION permission on the database and ALTER permission on the specified schema.

To drop a user-defined function, users must have CONTROL permission on the user-defined function and ALTER permission on the specified schema.

To grant, deny, or revoke permissions on the user-defined function to other users, users must have CONTROL permission on the user-defined function.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.