首页 > 解决方案 > 如何在 oracle 中将 3 列添加为 1

问题描述

大家好,我尝试添加 3 列并将其显示为 1 列。当我尝试这个时,我得到一个错误,我使用 concat 并尝试了这个。

我在 oracle 中使用我用谷歌搜索它显示 concat 作为答案,但它确实有效

我试过这个,但它说

select CONCAT(hiredate, 'Stared', employeeName) AS test from employee;

ORA-00909: 参数数量无效

我想将这 3 列视为 1,因此它需要显示 Test 2010 年 5 月 15 日测试 Jon jones

标签: sqloracleconcat

解决方案


一种选择是使用||连接运算符:

select hiredate ||' '|| 'Stared' ||' '|| employeeName
from some_table

推荐阅读