MariaDB 10.6 CONCATメソッドで数値にパーセントを付与する

環境
MariaDB 10.6.4
Windows 10 home 64bit

構文
CONCAT( 数値, '%’ )
「CONCAT( )」を使用して、数値にパーセントを連結します

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
MariaDB [(none)]> SELECT CONCAT(15, '%') result1,CONCAT(35.5, '%') result2;
+---------+---------+
| result1 | result2 |
+---------+---------+
| 15% | 35.5% |
+---------+---------+
1 row in set (0.000 sec)
MariaDB [(none)]> SELECT CONCAT(15, '%') result1,CONCAT(35.5, '%') result2; +---------+---------+ | result1 | result2 | +---------+---------+ | 15% | 35.5% | +---------+---------+ 1 row in set (0.000 sec)
MariaDB [(none)]> SELECT CONCAT(15, '%') result1,CONCAT(35.5, '%') result2;
+---------+---------+
| result1 | result2 |
+---------+---------+
| 15%     | 35.5%   |
+---------+---------+
1 row in set (0.000 sec)

 

MariaDB

Posted by arkgame