generate_uuid

Returns a new random UUID value varchar. The syntax is:

generate\_uuid()

This function is generates a random UUID value, formatted as a string. A UUID (Universally Unique Identifier), also known as GUID in some contexts, can be used as a unique key that can be shared universally with a negligible probability of collision. The function generates Version 4 (random) variant 1 UUIDs, which have 122 random bits, which has of the order of $5 x 10^36$ possible values.

Examples of typical use:

SELECT  generate\_uuid() UUID

The results might be:

UUID
 4b73106b-9b70-470d-bd7d-af0558561191

Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.