title: String formatting using LISTAGG in Oracle. Escaping single quote ` ' `
body: <p>How can I format the output of listagg in Oracle to produce output(every field in the single quote) as <code>'student1', 'student2', 'student3'</code>.<br>
  I have gone through documentation and other question on listagg but can't find much.
  <a href="https://stackoverflow.com/questions/4686543/sql-query-to-concatenate-column-values-from-multiple-rows-in-oracle">SQL Query to concatenate column values from multiple rows in Oracle</a> </p>
  
  <pre><code>SELECT LISTAGG(student_name,',')  WITHIN GROUP (ORDER BY student_name)
  from students
  </code></pre>
  
  <p>Thanks</p>