UUID_SHORT()
UUID_SHORT() is a SQL function in the MySQL Specific category. MySQL: returns a 64-bit universal identifier (not standard UUID). Guaranteed unique within a server. The syntax is UUID_SHORT(). It accepts none. It returns short UUID integer. A typical example: SELECT UUID_SHORT(); -- 987654321234567890 -- INSERT with short UUID as key: INSERT INTO items (id, name) VALUES (UUID_SHORT(), 'Widget'); -- Faster than UUID() (64-bit vs 128-bit), but only unique within this server -- Useful for distributed systems where server_id is configured A close relative is AUTO_INCREMENT, which mySQL auto-generates sequential integer values for this column. Commonly used with PRIMARY KEY. A close relative is ENGINE, which specifies the MySQL storage engine. InnoDB (default) supports transactions and foreign keys. MyISAM is faster for read-heavy. A close relative is LAST_INSERT_ID(), which returns the AUTO_INCREMENT value generated by the most recent INSERT in the current connection. More about this category: MySQL-specific features — AUTO_INCREMENT, ENGINE, SHOW TABLES, LIMIT.