SYS_GUID()

In 10.6 ES, 10.6 CS:

Returns a 32-byte globally unique identifier.

In 10.5 ES, 10.5 CS, 10.4 ES, 10.4 CS, 10.3 ES, 10.3 CS, 10.2 ES, 10.2 CS:

Not present

See also: Functions in 10.6 ES, in 10.6 CS, in 10.5 ES, in 10.5 CS, in 10.4 ES, in 10.4 CS, in 10.3 ES, in 10.3 CS, in 10.2 ES, and in 10.2 CS

USAGE

SYS_GUID()

DETAILS

  • SYS_GUID() returns a 32 byte globally unique identifier.

  • SYS_GUID() differs from UUID(), because the SYS_GUID() function does not include the '-' character in output, and it uses a different algorithm than UUID().

EXAMPLES

Simple Example

Each time SYS_GUID() is invoked, it returns a different value, even when invoked multiple times within the same expression. The change in value often occurs within the first 8 bytes:

SELECT SYS_GUID();
+----------------------------------+
| SYS_GUID()                       |
+----------------------------------+
| 48B6E39EEE5511EB8805BADD8ED179A2 |
+----------------------------------+
SELECT SYS_GUID();
+----------------------------------+
| SYS_GUID()                       |
+----------------------------------+
| 48B94E91EE5511EB8805BADD8ED179A2 |
+----------------------------------+

CHANGE HISTORY

Release Series

History

10.6 Enterprise

  • Added in MariaDB Enterprise Server 10.6.4-1.

10.6 Community

  • Added in MariaDB Community Server 10.6.1.

10.5 Enterprise

  • Not present.

10.5 Community

  • Not present.

10.4 Enterprise

  • Not present.

10.4 Community

  • Not present.

10.3 Enterprise

  • Not present.

10.3 Community

  • Not present.

10.2 Enterprise

  • Not present.

10.2 Community

  • Not present.

EXTERNAL REFERENCES