mssqlserver分区表的左值与右值
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了mssqlserver分区表的左值与右值,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2071字,纯文字阅读大概需要3分钟。
内容图文
![mssqlserver分区表的左值与右值](/upload/InfoBanner/zyjiaocheng/490/5131682b2d3c428092e0688aae80dbf4.jpg)
[20030101, 20040101)
, [20040101
, 999909999
)
Examples
A. Creating a RANGE LEFT partition function on an int column
The following partition function will partition a table or index into four partitions.
tsql
CREATE PARTITION FUNCTION myRangePF1 (int)
AS RANGE LEFT FOR VALUES (1, 100, 1000);
The following table shows how a table that uses this partition function on partitioning column col1 would be partitioned.
Partition 1 2 3 4
Values
col1 <= 1
col1 > 1
AND col1 <= 100
col1 > 100
AND col1 <=1000
col1 > 1000
B. Creating a RANGE RIGHT partition function on an int column
The following partition function uses the same values for boundary_value [ ,...n ] as the previous example, except it specifies RANGE RIGHT.
tsql
CREATE PARTITION FUNCTION myRangePF2 (int)
AS RANGE RIGHT FOR VALUES (1, 100, 1000);
The following table shows how a table that uses this partition function on partitioning column col1 would be partitioned.
Partition 1 2 3 4
Values
col1 < 1
col1 >= 1
AND col1 < 100
col1 >= 100
AND col1 < 1000
col1 >= 1000
C. Creating a RANGE RIGHT partition function on a datetime column
The following partition function partitions a table or index into 12 partitions, one for each month of a year‘s worth of values in a datetime column.
tsql
CREATE PARTITION FUNCTION [myDateRangePF1] (datetime)
AS RANGE RIGHT FOR VALUES (‘20030201‘, ‘20030301‘, ‘20030401‘,
‘20030501‘, ‘20030601‘, ‘20030701‘, ‘20030801‘,
‘20030901‘, ‘20031001‘, ‘20031101‘, ‘20031201‘);
The following table shows how a table or index that uses this partition function on partitioning column datecol would be partitioned.
Partition 1 2 ... 11 12
Values
datecol < February 1, 2003
datecol >= February 1, 2003
AND datecol < March 1, 2003
datecol >= November 1, 2003
AND col1 < December 1, 2003
datecol >= December 1, 2003
mssqlserver分区表的左值与右值
标签:cep UI 一个 右值 sof class ros partition http
本文系统来源:http://www.cnblogs.com/81/p/7436666.html
内容总结
以上是互联网集市为您收集整理的mssqlserver分区表的左值与右值全部内容,希望文章能够帮你解决mssqlserver分区表的左值与右值所遇到的程序开发问题。
如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。
来源:【匿名】