sql server 创建分区表
CREATE PARTITION FUNCTION myRangePF1 (datetime2(0))
AS RANGE RIGHT FOR VALUES ('2022-04-01', '2022-05-01', '2022-06-01') ;
GO
CREATE PARTITION SCHEME myRangePS1
AS PARTITION myRangePF1
ALL TO ('PRIMARY') ;
GO
CREATE TABLE dbo.PartitionTable (col1 datetime2(0) PRIMARY KEY, col2 char(10))
ON myRangePS1 (col1) ;
GO
参考:
创建分区的表和索引 - SQL Server, Azure SQL Database, Azure SQL Managed Instance | Microsoft Learn
原文地址:https://blog.csdn.net/woshilys/article/details/143746377
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!