||
MySQLでも機能しますが、sql_mode
を設定する必要があります PIPES_AS_CONCAT
へ 。
デモ:
mysql> select c from tmp;
+------+
| c |
+------+
| foo |
| bar |
+------+
2 rows in set (0.00 sec)
mysql> select c||' hi' from tmp;
+----------+
| c||' hi' |
+----------+
| 0 |
| 0 |
+----------+
2 rows in set, 2 warnings (0.00 sec)
mysql> set sql_mode=PIPES_AS_CONCAT;
Query OK, 0 rows affected (0.00 sec)
mysql> select c||' hi' from tmp;
+----------+
| c||' hi' |
+----------+
| foo hi |
| bar hi |
+----------+
2 rows in set (0.00 sec)