Rules for partitioning columns in SQL Server partitioned views

Source: Internet
Author: User
Tags one table

Partitioning column Rules
The partitioning column exists on each member table and identifies the available data in a particular table through a CHECK constraint. The partitioning column must adhere to the following rules:

Each base table has a partition column that has key values enforced by the CHECK constraint. The key range of the CHECK constraint for each table does not overlap with any other tables. The given value of any partition column must be mapped to only one table. A CHECK constraint can use only the following operators: between, and, or, <, <=, >, >=, =.


The partition column cannot be an identity, default, or timestamp column.


In the view, the partition column must be at the same ordinal position in the select list of each SELECT statement. For example, a partition column is either always the first column in each selection list, or it is always the second column in each selection list, and so on.


The partition column is not allowed to be empty.


The partition column must be part of the primary key of the table.


A partition column cannot be a computed column.


There must be only one constraint on the partition column. If there are more than one constraint, SQL Server ignores all constraints and does not take into account those constraints when determining whether the view is a partitioned view.


The updatable nature of a partitioned column is not constrained.

Rules for partitioning columns in SQL Server partitioned views

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.