SQL UUID
How to generate a standard UUID (typically v4) in SQL, using the standard library or a widely used package.
Code
-- PostgreSQL 13+
SELECT gen_random_uuid();
-- MySQL 8
SELECT UUID();
Most languages provide v4 (random) out of the box, while v7 or ULID may require a separate library.