Skip to main content

1E 8.1 (on-premises)

NEWID

Function

NEWID

Action

Generates a new universally unique identifier (also known as a GUID)

Parameters

None

Return values

(string) New identifier of the form "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".

Example

// Generate a list of 10 random GUIDs
@seq = Utilities.GenerateSequence(Limit: 10);
SELECT NewId() AS MyNewGuid FROM @seq;

Notes

Note that the return value is a string, and is returned in lowercase.

New in v8.1