Conversion

UUID_SHORT

MySQLMySQL

Menghasilkan 64-bit unsigned integer yang unik. Lebih cepat dan compact dari UUID().

Tipe hasil: BIGINT UNSIGNEDDiperbarui: 7 Jan 2026

Syntax

SQL
UUID_SHORT()

Parameter

Fungsi ini tidak memerlukan parameter.

Contoh Penggunaan

Generate Short ID

SQL
1SELECT UUID_SHORT() AS short_id;

Generate 64-bit unique ID.

Hasil
short_id: 101232134567891234

Insert with Short UUID

SQL
1INSERT INTO events (id, event_name)
2VALUES (UUID_SHORT(), 'New Event');

Menggunakan UUID_SHORT sebagai ID.

Hasil
(inserted with unique ID)

Batch IDs

SQL
1SELECT UUID_SHORT() AS id1,
2 UUID_SHORT() AS id2,
3 UUID_SHORT() AS id3;

Generate multiple IDs sekaligus.

Hasil
(three unique IDs)

Fungsi Terkait