我想将检索到的列值显示为一行。
SQL查询是:
select last_name from employees where emp_name like 'S%';
以上查询的结果是:
Employees Name
--------------
Shin
Shank
Sunil
Sri
预期结果是:
Employees Name
--------------
Shin Shank Sunil Sri
提前致谢。
答案 0 :(得分:1)
select listagg(last_name,' ') within group (order by emp_name)
from employees
where emp_name like 'S%';