NEWID
Newid, in the context of Microsoft SQL Server, refers to the NEWID function, which generates a new value of the uniqueidentifier data type. A uniqueidentifier is commonly known as a GUID (globally unique identifier) and is intended to be unique across databases and servers. NEWID produces a 128-bit value typically displayed in the standard GUID format, such as xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
The NEWID function generates a random GUID rather than a deterministic sequence. It is non-deterministic, making
Usage and examples are straightforward. The function is invoked as SELECT NEWID(); to return a new GUID
Related alternatives include NEWSEQUENTIALID, which returns sequential GUIDs that are designed to reduce index fragmentation when
In other database systems, similar functionality exists under different names, such as UUID generation functions in