【发布时间】:2018-08-31 18:20:04
【问题描述】:
假设我在 oracle 中查询如下:
SELECT author_id, author_name,
(
SELECT book_title FROM books
WHERE author_id = a.author_id
)
FROM author a
在特定 author_id 的子查询中,可以有多本书由他们编写。但 Oracle 不允许从子查询返回多行。那么如何在 oracle 中连续为同一作者附加不同的 book_title 以逗号分隔。
【问题讨论】:
标签: database oracle subquery concatenation oracle-sqldeveloper