UUID()

Overview

Returns a unique value of Universal Unique Identifier.

USAGE

UUID()

DETAILS

  • UUID() is an information function that returns a Universal Unique Identifier (UUID).

The return value is an ASCII string that is globally unique. Every call returns a new unique value, even within a single statement.

The return value conforms to RFC 4122, "A Universally Unique Identifier (UUID) URN Namespace". It encodes 128 bits of unique information.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

Simple Example

SELECT UUID();
+--------------------------------------+
| UUID()                               |
+--------------------------------------+
| f09d9263-ee58-11eb-8805-badd8ed179a2 |
+--------------------------------------+
SELECT UUID();
+--------------------------------------+
| UUID()                               |
+--------------------------------------+
| f1858aad-ee58-11eb-8805-badd8ed179a2 |
+--------------------------------------+
SELECT IF(UUID() = UUID(), 'DUPLICATED!', 'different') AS two_calls;
+-----------+
| two_calls |
+-----------+
| different |
+-----------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES