In earlier versions of sql server , functions are categorized only as deterministic or nondeterministic 在sql server的早期版本中,函数只能分为确定性函数和不确定性函数两类。
Getdate is not deterministic because it is always invoked with the same argument , but the value it returns changes each time it is executed Getdate不是确定性函数,因为总是使用相同的参数调用它,而它在每次执行时返回结果都不同。
Enable grouping by a column that is derived from a scalar subselect , or a function that is either not deterministic or has external access 启用按从标量嵌套select语句派生的列进行分组,或者按不确定性函数或有外部访问的函数进行分组。
The value for each row at the subscriber depends on the data at the subscriber and whether the computation for the column uses nondeterministic functions 订阅服务器上每一行的值都取决于订阅服务器上的数据以及列的计算是否使用不确定性函数。
If the data is different or the computation uses one or more nondeterministic functions , the values at the publisher and subscriber could be different 如果数据不同或者计算使用一个或多个不确定性函数,则发布服务器和订阅服务器上的值就可能不同。
For example , the dateadd function is deterministic because it always returns the same result for any given set of argument values for its three parameters 例如, dateadd函数是确定性函数,因为对于其三个参数的任何给定参数值集它总是返回相同的结果。
If the data at the publisher and subscriber are identical at a given point in time and the computation uses only deterministic functions , the computed values for a row are identical 如果发布服务器和订阅服务器上的数据在给定时点相同,并且计算仅使用确定性函数,则行的计算值就会相同。
For example , functions that always return the same result any time they are called by using a specific set of input values and with the same state of the database would be labeled deterministic 例如,如果每次使用一组特定输入值和相同数据库状态调用函数时,函数都返回相同结果,则该函数将被标记为确定性函数。