How can multiple rows be concatenated into one in Oracle without creating a stored procedure? [duplicate]
问题 This question already has an answer here: SQL Query to concatenate column values from multiple rows in Oracle 11 answers How can I achieve the following in oracle without creating a stored procedure? Data Set: question_id element_id 1 7 1 8 2 9 3 10 3 11 3 12 Desired Result: question_id element_id 1 7,8 2 9 3 10,11,12 回答1: There are many way to do the string aggregation, but the easiest is a user defined function. Try this for a way that does not require a function. As a note, there is no