运算符 || 用于字符串连接,|| 左右都是字符串类型。
SELECT customer_name,
customer_name || 'name',
'str1' || 'str2',
'str' || Cast(100 AS VARCHAR)
FROM t_fact_customers
WHERE customer_id < 4;
+---------------+---------------+----------+--------+
| customer_name | _col1 | _col2 | _col3 |
+---------------+---------------+----------+--------+
| 王小二 | 王小二name | str1str2 | str100 |
| 李春梅 | 李春梅name | str1str2 | str100 |
| 张大山 | 张大山name | str1str2 | str100 |
+---------------+---------------+----------+--------+
在文档使用中是否遇到以下问题
更多建议
匿名提交