直接将普通表改为分区表

时间:2021-04-08 04:38:18
alter table tableName drop CONSTRAINT PK_tableName
go
ALTER TABLE [dbo].[tableName] ADD  CONSTRAINT [PK_tableName] PRIMARY KEY CLUSTERED 
(
	id asc,[addTime] ASC
)
ON datetime_scheme(addTime)
GO