All pages
Powered by GitBook
1 of 1

Loading...

UUID_v7

Generate a time-ordered UUID (v7). This function returns a version 7 UUID, which is sortable by creation time.

UUID_v7 is available from MariaDB .

It is possible to generate UUIDv4 and UUIDv7, in addition to UUIDv1.

Syntax

Description

Returns a Universally Unique Identifier (UUID) version 7. To generate a version 1 UUID, see the function. To generate a version 4 UUID, see .

A UUID is designed as a number that is globally unique in space and time. Two calls to UUID() are expected to generate two different values, even if these calls are performed on two separate computers that are not connected to each other.

A UUID is a 128-bit number represented by a utf8 string of five hexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee format.

Statements using the UUID_v7() function are .

Examples

See Also

  • v1

  • - Return short (64 bit) Universal Unique Identifier

  • - UUID without the - character for Oracle compatibility

This page is licensed: CC BY-SA / Gnu FDL

UUID_v7()

UUID data type

  • MDEV-11339 (Support UUID v4 generation)

  • MDEV-32637 (Implement native UUID7 function)

  • uuid7.com

  • UUID
    UUID_v4
    not safe for statement-based replication
    UUID()
    UUID_v4()
    UUID_SHORT()
    SYS_GUID
    SELECT UUID(),UUID_v4(),UUID_v7()\G 
    *************************** 1. row ***************************
      UUID(): 63ae8c92-799a-11ef-98b2-f859713e4be4
    UUID_v4(): a2443495-1b94-415b-b6fa-fe8e79ba4812
    UUID_v7(): 01921e85-f198-7490-9b89-7dd0d468543b
    11.7