Answer: This CHECKSUM_AGG function will returns a value to evaluate whether the changes are happened. This function will returns the value for a specific column or for the entire table.
The datatype for this function will be either an integer datatype or BINARY_CHECKSUM function result.
Example:
Using CHECKSUM_AGG function with BINARY_CHECKSUM to detect changes in a table:
SELECT CHECKSUM_AGG(BINARY_CHECKSUM(UnitsInStock))
FROM Products
Output
7913472
Asked In: Many Interviews |
Alert Moderator