UserDefinedFunction 類別
The UserDefinedFunction object represents a SQL Server user-defined function.
命名空間: Microsoft.SqlServer.Management.Smo
組件: Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)
語法
'宣告
<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
'用途
Dim instance As UserDefinedFunction
[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
[<SealedAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<StateChangeEventAttribute("CREATE_FUNCTION", "FUNCTION")>]
[<StateChangeEventAttribute("ALTER_FUNCTION", "FUNCTION")>]
[<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)>]
[<StateChangeEventAttribute("RENAME", "FUNCTION")>]
type UserDefinedFunction =
class
inherit ScriptSchemaObjectBase
interface ICreatable
interface IAlterable
interface IRenamable
interface IDroppable
interface IExtendedProperties
interface IScriptable
interface ITextObject
interface IColumnPermission
interface IObjectPermission
end
public final class UserDefinedFunction extends ScriptSchemaObjectBase implements ICreatable, IAlterable, IRenamable, IDroppable, IExtendedProperties, IScriptable, ITextObject, IColumnPermission, IObjectPermission
備註
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
這種類型的任何公用靜態 (在 Microsoft Visual Basic 中則為 Shared) 成員都可用於多執行緒作業。並不是所有的執行個體成員都保證可以用於所有的執行緒。
繼承階層
System. . :: . .Object
Microsoft.SqlServer.Management.Smo. . :: . .SmoObjectBase
Microsoft.SqlServer.Management.Smo. . :: . .SqlSmoObject
Microsoft.SqlServer.Management.Smo. . :: . .NamedSmoObject
Microsoft.SqlServer.Management.Smo. . :: . .ScriptNameObjectBase
Microsoft.SqlServer.Management.Smo. . :: . .ScriptSchemaObjectBase
Microsoft.SqlServer.Management.Smo..::..UserDefinedFunction
執行緒安全性
這個類型的任何公用static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。不保證任何執行個體成員都可以是安全執行緒。