Share via


Table.SwitchPartition Method (Table, Int32)

Switches the table to the partition with the specified partition number of the specified target table.

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

Syntax

'Declaration
Public Sub SwitchPartition ( _
    targetTable As Table, _
    targetPartitionNumber As Integer _
)
'Usage
Dim instance As Table 
Dim targetTable As Table 
Dim targetPartitionNumber As Integer

instance.SwitchPartition(targetTable, _
    targetPartitionNumber)
public void SwitchPartition(
    Table targetTable,
    int targetPartitionNumber
)
public:
void SwitchPartition(
    Table^ targetTable, 
    int targetPartitionNumber
)
member SwitchPartition : 
        targetTable:Table * 
        targetPartitionNumber:int -> unit
public function SwitchPartition(
    targetTable : Table, 
    targetPartitionNumber : int
)

Parameters

  • targetPartitionNumber
    Type: System.Int32
    An Int32 value that specifies the partition number of the target partition.

Examples

Using Filegroups and Files to Store Data

See Also

Reference

Table Class

SwitchPartition Overload

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Creating, Altering, and Removing Tables

Tables

sp_addmergepartition (Transact-SQL)