Converts a UUID string to BINARY(16) format for more efficient storage.
BINARY(16)Diperbarui: 13 Jun 2026UUID_TO_BIN(uuid_string[, swap_flag])The UUID in string format
Set to 1 to swap time-low and time-high bits for better index performance
1 SELECT UUID_TO_BIN('550e8400-e29b-41d4-a716-446655440000') AS bin_uuid;
Convert a UUID string to binary format.
1 INSERT INTO entities (id, name) 2 VALUES (UUID_TO_BIN(UUID(), 1), 'Entity Name');
Store a UUID efficiently using the swap flag for better index locality.
1 SELECT * FROM entities 2 WHERE id = UUID_TO_BIN('550e8400-e29b-41d4-a716-446655440000', 1);
Query a record using a binary UUID.
Sudah paham UUID_TO_BIN? Latih langsung di browser
Latihan interaktif, langsung di browser.