有分区表TB2和TB2_History
CREATE TABLE TB2
(
ID BIGINT IDENTITY(1,1) PRIMARY KEY,
C1 NVARCHAR(200)
)ON[ps_Test1](ID)
GO
CREATE TABLE TB2_History(
ID BIGINT PRIMARY KEY,
C1 NVARCHAR(200)
)ON [pS_Test1](ID)
需要将TB2上的历史数据移动到TB2_History 中
ALTER TABLE TB2
SWITCH PARTITION 2 TO TB2_History PARTITION 2