![]() ![]() Let’s take a look at an example of using UUID as the primary key. The following are the valid string-format UUID in MySQL: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeeĬode language: SQL (Structured Query Language) ( sql ) MySQL UUID example In case the argument is NULL, the IS_UUID() function returns NULL. If the argument is not valid string format UUID, the IS_UUID function returns 0. The IS_UUID() function returns 1 if the argument is a valid string-format UUID. ![]() ![]() The UUID_TO_BIN() function converts a UUID from a human-readable format ( VARCHAR) into a compact format (BINARY) format for storing and the BIN_TO_UUID() function converts UUID from the compact format ( BINARY)to human-readable format ( VARCHAR) for displaying. Notice that UUID_TO_BIN(), BIN_TO_UUID(), and IS_UUID() functions are only available in MySQL 8.0 or later. In MySQL, you can store UUID values in a compact format ( BINARY) and display them in human-readable format ( VARCHAR) with help of the following functions:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |