All functions that exist in SQL Server are either deterministic or nondeterministic. The determinism of a function is defined by the data that is returned by the function. The following outlines the determinism of a function:
A function is considered deterministic if it always returns the same result set when it's called with the same set of input values.
A function is considered nondeterministic if it doesn't always return the same result every time it's called with the same set of input values .
This might sound somewhat complicated, but it really isn't. Take, for example, the DATEDIFF and GETDATE functions. DATEDIFF is deterministic because it will always return the same data every time it's run with the same input parameters. ...