Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 708 Bytes

File metadata and controls

22 lines (18 loc) · 708 Bytes
author rwestMSFT
ms.author randolphwest
ms.date 07/18/2025
ms.service sql
ms.topic include

The following nondeterministic built-in functions cannot be used in a [!INCLUDE tsql-md] user-defined function (UDF).

  • NEWID
  • NEWSEQUENTIALID
  • RAND
  • TEXTPTR

If you reference one of these functions inside a UDF, you get the following error:

Msg 443, Level 16, State 1
Invalid use of a side-effecting operator <operator> within a function.

For a list of deterministic and nondeterministic built-in system functions, see Deterministic and nondeterministic functions.