3. Elements of SQL Statements : SQL Functions : UUID Functions : UUID_CREATE( ) Function
 
Share this page                  
UUID_CREATE( ) Function
The UUID_CREATE() function creates a 128 bit UUID:
> createdb uuiddb
> sql uuiddb
* CREATE TABLE uuidtable (u1 BYTE (16), u2 BYTE(16));
* INSERT INTO uuidtable VALUES (UUID_CREATE(), UUID_CREATE());
//
// Verify the length in byte format
//
* SELECT LENGTH(u1) FROM uuidtable;
//
//Length returned equals 16 bytes
//