mysql> select concat('uuid:',select replace(uuid(),'-',''));
報錯如下
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select replace(uuid(),'-',''))' at line 1
uj5u.com熱心網友回復:
select concat('uuid:',replace(uuid(),'-',''));這樣寫 去掉中間那個select
uj5u.com熱心網友回復:
mysql> select concat('uuid:',(select replace(uuid(),'-','')));
+-------------------------------------------------+
| concat('uuid:',(select replace(uuid(),'-',''))) |
+-------------------------------------------------+
| uuid:36185cf0add411e89d643464a9d3d8f5 |
+-------------------------------------------------+
1 row in set (0.00 sec)
mysql> select concat('uuid:',replace(uuid(),'-',''));
+----------------------------------------+
| concat('uuid:',replace(uuid(),'-','')) |
+----------------------------------------+
| uuid:3fcd6a45add411e89d643464a9d3d8f5 |
+----------------------------------------+
1 row in set (0.00 sec)
mysql>
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/81764.html
標籤:MySQL
