Home  >  Article  >  Database  >  What is the result of concatenating server_id and UUID in MySQL?

What is the result of concatenating server_id and UUID in MySQL?

WBOY
WBOYforward
2023-09-17 18:29:021356browse

在 MySQL 中连接 server_id 和 UUID 会产生什么结果?

Yes, you can easily connect the server ID and UUID. The syntax is as follows:

SELECT CONCAT(@@ server_id,UUID())

In the above code, we use @@server_id to get the value of server_id. @@server_id is a system-defined variable. Now let us take a look at the query statement

mysql> SELECT CONCAT(@@server_id, UUID()) AS ServerUUIDDemo;

The following is the output showing the concatenation result of server_id and UUID

+---------------------------------------+
| ServerUUIDDemo                        |
+---------------------------------------+
| 14d16521c-3161-11e9-9ed7-78843ce8de7e |
+---------------------------------------+
1 row in set (0.00 sec)

The above is the detailed content of What is the result of concatenating server_id and UUID in MySQL?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete