DefaultRuleBase.BindToColumn Method (String, String)

Binds the default or rule to the specified column in the specified table.

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

Syntax

'Declaration
Public Sub BindToColumn ( _
    tablename As String, _
    colname As String _
)
'Usage
Dim instance As DefaultRuleBase 
Dim tablename As String 
Dim colname As String

instance.BindToColumn(tablename, colname)
public void BindToColumn(
    string tablename,
    string colname
)
public:
void BindToColumn(
    String^ tablename, 
    String^ colname
)
member BindToColumn : 
        tablename:string * 
        colname:string -> unit
public function BindToColumn(
    tablename : String, 
    colname : String
)

Parameters

  • tablename
    Type: System.String
    A String value that specifies the name of the table in which the column resides.

Examples

Creating, Altering, and Removing Defaults

Creating, Altering, and Removing Rules

See Also

Reference

DefaultRuleBase Class

BindToColumn Overload

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Working with Database Objects

Rules

Defaults

sp_bindrule (Transact-SQL)

sp_bindefault (Transact-SQL)