Deterministic functions:
Deterministic functions always result in the same output every time they are called with a fixed set of input values and given the same condition of the database.
For example, AVG() function always results the same result given the qualifications stated above.
Nondeterministic functions:
Nondeterministic functions result in different output each time they are called with a fixed set of input values even if the database state that they access remains the same.
For example, GETDATE() function, results the current date and time value, always a different value.
Consider a statement that deletes one hundred rows of a one-thousand-row table with no ORDER BY clause. If the rows are ordered differently between source and replica, you may delete a different one hundred rows on each, leading to inconsistencies.
Leave a Reply