Bạn có thể sử dụng:
SELECT LISTAGG('''' || student_name || '''',',')
WITHIN GROUP (ORDER BY student_name)
FROM students;
hoặc sử dụng ENQUOTE_LITERAL
chức năng:
SELECT LISTAGG(DBMS_ASSERT.ENQUOTE_LITERAL(student_name),',')
WITHIN GROUP (ORDER BY student_name) AS r
FROM students;