Skip to content

Commit aa5ca18

Browse files
authored
Merge pull request #12010 from WilliamAntonRohm/issue-2934
sql-docs issue 2934 -- had "should" for "must"
2 parents 49f172c + c50243b commit aa5ca18

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/t-sql/statements/create-view-transact-sql.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ OR ALTER
159159

160160
If a view depends on a table or view that was dropped, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] produces an error message when anyone tries to use the view. If a new table or view is created and the table structure does not change from the previous base table to replace the one dropped, the view again becomes usable. If the new table or view structure changes, the view must be dropped and re-created.
161161

162-
If a view is not created with the SCHEMABINDING clause, [sp_refreshview](../../relational-databases/system-stored-procedures/sp-refreshview-transact-sql.md) should be run when changes are made to the objects underlying the view that affect the definition of the view. Otherwise, the view might produce unexpected results when it is queried.
162+
If a view is not created with the SCHEMABINDING clause, run [sp_refreshview](../../relational-databases/system-stored-procedures/sp-refreshview-transact-sql.md) when changes are made to the objects underlying the view that affect the definition of the view. Otherwise, the view might produce unexpected results when it is queried.
163163

164164
When a view is created, information about the view is stored in the following catalog views: [sys.views](../../relational-databases/system-catalog-views/sys-views-transact-sql.md), [sys.columns](../../relational-databases/system-catalog-views/sys-columns-transact-sql.md), and [sys.sql_expression_dependencies](../../relational-databases/system-catalog-views/sys-sql-expression-dependencies-transact-sql.md). The text of the CREATE VIEW statement is stored in the [sys.sql_modules](../../relational-databases/system-catalog-views/sys-sql-modules-transact-sql.md) catalog view.
165165

@@ -239,11 +239,11 @@ FROM Tn;
239239

240240
1. The select `list`
241241

242-
- All columns in the member tables should be selected in the column list of the view definition.
242+
- In the column list of the view definition, select all columns in the member tables.
243243

244-
- The columns in the same ordinal position of each `select list` should be of the same type, including collations. It is not sufficient for the columns to be implicitly convertible types, as is generally the case for UNION.
244+
- Ensure that the columns in the same ordinal position of each `select list` are of the same type, including collations. It is not sufficient for the columns to be implicitly convertible types, as is generally the case for UNION.
245245

246-
Also, at least one column (for example `<col>`) must appear in all the select lists in the same ordinal position. This `<col>` should be defined in a way that the member tables `T1, ..., Tn` have CHECK constraints `C1, ..., Cn` defined on `<col>`, respectively.
246+
Also, at least one column (for example `<col>`) must appear in all the select lists in the same ordinal position. Define `<col>` in a way that the member tables `T1, ..., Tn` have CHECK constraints `C1, ..., Cn` defined on `<col>`, respectively.
247247

248248
Constraint `C1` defined on table `T1` must be of the following form:
249249

@@ -257,7 +257,7 @@ FROM Tn;
257257
< col > { < | <= } < value2 >
258258
```
259259
260-
- The constraints should be in such a way that any specified value of `<col>` can satisfy, at most, one of the constraints `C1, ..., Cn` so that the constraints should form a set of disjointed or nonoverlapping intervals. The column `<col>` on which the disjointed constraints are defined is called the partitioning column. Note that the partitioning column may have different names in the underlying tables. The constraints should be in an enabled and trusted state for them to meet the previously mentioned conditions of the partitioning column. If the constraints are disabled, re-enable constraint checking by using the CHECK CONSTRAINT *constraint_name* option of ALTER TABLE, and using the WITH CHECK option to validate them.
260+
- The constraints must be in such a way that any specified value of `<col>` can satisfy, at most, one of the constraints `C1, ..., Cn` so that the constraints form a set of disjointed or nonoverlapping intervals. The column `<col>` on which the disjointed constraints are defined is called the partitioning column. Note that the partitioning column may have different names in the underlying tables. The constraints must be in an enabled and trusted state for them to meet the previously mentioned conditions of the partitioning column. If the constraints are disabled, re-enable constraint checking by using the CHECK CONSTRAINT *constraint_name* option of ALTER TABLE, and using the WITH CHECK option to validate them.
261261
262262
The following examples show valid sets of constraints:
263263
@@ -274,7 +274,7 @@ FROM Tn;
274274
275275
- It cannot be a computed, identity, default, or **timestamp** column.
276276
277-
- If there is more than one constraint on the same column in a member table, the Database Engine ignores all the constraints and does not consider them when determining whether the view is a partitioned view. To meet the conditions of the partitioned view, there should be only one partitioning constraint on the partitioning column.
277+
- If there is more than one constraint on the same column in a member table, the Database Engine ignores all the constraints and does not consider them when determining whether the view is a partitioned view. To meet the conditions of the partitioned view, ensure that there is only one partitioning constraint on the partitioning column.
278278
279279
- There are no restrictions on the updatability of the partitioning column.
280280
@@ -288,16 +288,16 @@ FROM Tn;
288288
289289
- The member tables cannot have indexes created on computed columns in the table.
290290
291-
- The member tables should have all PRIMARY KEY constraints on the same number of columns.
291+
- The member tables have all PRIMARY KEY constraints on the same number of columns.
292292
293-
- All member tables in the view should have the same ANSI padding setting. This can be set by using either the **user options** option in **sp_configure** or the SET statement.
293+
- All member tables in the view have the same ANSI padding setting. This can be set by using either the **user options** option in **sp_configure** or the SET statement.
294294
295295
## Conditions for Modifying Data in Partitioned Views
296296
The following restrictions apply to statements that modify data in partitioned views:
297297
298-
- The INSERT statement must supply values for all the columns in the view, even if the underlying member tables have a DEFAULT constraint for those columns or if they allow for null values. For those member table columns that have DEFAULT definitions, the statements cannot explicitly use the keyword DEFAULT.
298+
- The INSERT statement supplies values for all the columns in the view, even if the underlying member tables have a DEFAULT constraint for those columns or if they allow for null values. For those member table columns that have DEFAULT definitions, the statements cannot explicitly use the keyword DEFAULT.
299299
300-
- The value being inserted into the partitioning column should satisfy at least one of the underlying constraints; otherwise, the insert action will fail with a constraint violation.
300+
- The value being inserted into the partitioning column satisfies at least one of the underlying constraints; otherwise, the insert action will fail with a constraint violation.
301301
302302
- UPDATE statements cannot specify the DEFAULT keyword as a value in the SET clause, even if the column has a DEFAULT value defined in the corresponding member table.
303303
@@ -319,7 +319,7 @@ FROM Tn;
319319
320320
- A distributed transaction will be started to guarantee atomicity across all nodes affected by the update.
321321
322-
- The XACT_ABORT SET option should be set to ON for INSERT, UPDATE, or DELETE statements to work.
322+
- Set the XACT_ABORT SET option to ON for INSERT, UPDATE, or DELETE statements to work.
323323
324324
- Any columns in remote tables of type **smallmoney** that are referenced in a partitioned view are mapped as **money**. Therefore, the corresponding columns (in the same ordinal position in the select list) in the local tables must also be of type **money**.
325325
@@ -334,7 +334,7 @@ FROM Tn;
334334
## Considerations for Replication
335335
To create partitioned views on member tables that are involved in replication, the following considerations apply:
336336
337-
- If the underlying tables are involved in merge replication or transactional replication with updating subscriptions, the **uniqueidentifier** column should also be included in the select list.
337+
- If the underlying tables are involved in merge replication or transactional replication with updating subscriptions, ensure that the **uniqueidentifier** column is also included in the select list.
338338
339339
Any INSERT actions into the partitioned view must provide a NEWID() value for the **uniqueidentifier** column. Any UPDATE actions against the **uniqueidentifier** column must supply NEWID() as the value because the DEFAULT keyword cannot be used.
340340

0 commit comments

Comments
 (0)