Purpose
This function generates and returns a globally unique identifier (GUID) consisting of 16 bytes, which is a globally unique sequence number.
Syntax
SYS_GUID()
Return type
Returns a string of 32 characters in hexadecimal format.
Examples
Create a table named tbl1 and insert three rows of data with unique identifiers.
obclient> CREATE TABLE tbl1(col1 INT,col2 RAW(16));
Query OK, 0 rows affected
obclient> INSERT INTO tbl1 VALUES(1,SYS_GUID()),(2,SYS_GUID()),(3,SYS_GUID());
Query OK, 3 rows affected
Records: 3 Duplicates: 0 Warnings: 0
obclient> SELECT * FROM tbl1;
+------+----------------------------------+
| COL1 | COL2 |
+------+----------------------------------+
| 1 | 442E52AC599411EC8C99B6945CA6C7B0 |
| 2 | 442EC8D1599411EC8C99B6945CA6C7B0 |
| 3 | 442ED1F1599411EC8C99B6945CA6C7B0 |
+------+----------------------------------+
3 rows in set
