【发布时间】:2018-02-04 13:31:51
【问题描述】:
我从以下查询中获取逗号分隔值SELECT LISTAGG('''' || student_name || '''',',')
WITHIN GROUP (ORDER BY student_name)
FROM students;
但是,当我输入子查询时,它没有给出任何结果。select * from students where student_name in ('A', 'B'); --give 两行
select * from students where student_name in (SELECT LISTAGG('''' || student_name || '''',',')
WITHIN GROUP (ORDER BY student_name)
FROM students;) -- 没有行
【问题讨论】:
-
这是
https://stackoverflow.com/questions/39854040/how-to-use-listagg-to-return-rows-prefixed-with-quotes的跟进 -
对于那些希望能够点击超文本链接的人,这是this old StackOverflow的后续行动
标签: sql oracle string-aggregation