You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns the checksum of the values in a group. Null values are ignored. Can be followed by the [OVER clause](../../t-sql/queries/select-over-clause-transact-sql.md).
34
+
This function returns the checksum of the values in a group. `CHECKSUM_AGG` ignores null values. The [OVER clause](../../t-sql/queries/select-over-clause-transact-sql.md) can follow `CHECKSUM_AGG`.
35
35
36
36
[Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
Applies the aggregate function to all values. ALL is the default.
46
+
Applies the aggregate function to all values. ALL is the default argument.
47
47
48
48
DISTINCT
49
-
Specifies that CHECKSUM_AGG returns the checksum of unique values.
49
+
Specifies that `CHECKSUM_AGG` returns the checksum of unique values.
50
50
51
51
*expression*
52
-
Is an integer [expression](../../t-sql/language-elements/expressions-transact-sql.md). Aggregate functions and subqueries are not allowed.
52
+
An integer [expression](../../t-sql/language-elements/expressions-transact-sql.md). `CHECKSUM_AGG` does not allow use of aggregate functions or subqueries.
53
53
54
54
## Return types
55
55
Returns the checksum of all *expression* values as **int**.
56
56
57
57
## Remarks
58
-
CHECKSUM_AGG can be used to detect changes in a table.
58
+
`CHECKSUM_AGG` can detect changes in a table.
59
59
60
-
The order of the rows in the table does not affect the result of CHECKSUM_AGG. Also, CHECKSUM_AGG functions may be used with the DISTINCT keyword and the GROUP BY clause.
60
+
The `CHECKSUM_AGG` result does not depend on the order of the rows in the table. Also, `CHECKSUM_AGG` functions allow the use of the DISTINCT keyword and the GROUP BY clause.
61
61
62
-
If one of the values in the expression list changes, the checksum of the list also generally changes. However, there is a small chance that the checksum will not change.
62
+
If an expression list value changes, the list checksum value list will also probably change. However, a small possibility exists that the calculated checksum will not change.
63
63
64
-
CHECKSUM_AGG has similar functionality with other aggregate functions. For more information, see [Aggregate Functions (Transact-SQL)](../../t-sql/functions/aggregate-functions-transact-sql.md).
64
+
`CHECKSUM_AGG` has functionality similar to that of other aggregate functions. For more information, see [Aggregate Functions (Transact-SQL)](../../t-sql/functions/aggregate-functions-transact-sql.md).
65
65
66
66
## Examples
67
-
The following example uses`CHECKSUM_AGG` to detect changes in the `Quantity` column of the `ProductInventory` table in the [!INCLUDE[ssSampleDBnormal](../../includes/sssampledbnormal-md.md)] database.
67
+
These examples use`CHECKSUM_AGG` to detect changes in the `Quantity` column of the `ProductInventory` table in the [!INCLUDE[ssSampleDBnormal](../../includes/sssampledbnormal-md.md)] database.
68
68
69
69
```sql
70
70
--Get the checksum value before the column value is changed.
0 commit comments