Name

UUID ( )

Synopsis

UUID( )

This function returns a Universal Unique Identifier (UUID), a 128-bit number composed of five hexadecimal numbers. This number is intended to be unique per invocation and is based on values that are both temporal and spatial. There are no arguments for the function. It’s available as of Version 4.1.2 of MySQL.

SELECT UUID( );
+----------------------------------------+
| UUID( )                                 |
+----------------------------------------+
| '8bde367a-caeb-0933-1031-7730g3321c32' |
+----------------------------------------+

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.