Deterministic SQL Functions

Deterministic SQL Functions

SQL functions in SQLite can be either "deterministic" or "non-deterministic".

A deterministic function always gives the same answer whenever it has the same inputs. Most built-in SQL functions in SQLite are deterministic. For example, the abs(X) function always returns the same answer as long as its input X is the same.

Non-deterministic functions might give different answers on each invocation, even if the arguments are always the same. The following are examples of non-deterministic functions: