I Have a pl-sql procedure of the below type:
BEGIN
p_name_all  VARCHAR2(20000 CHAR) ;
 ... 
 ...
 FOR name_rec IN name_cur
 LOOP
 IF (p_name_all IS NULL)
 p_name_all := '//' || name_rec.NAME || '//';  
 select RTRIM('p_name_all','//') from dual;
 ....
 ....
END IF
END LOOP
END
When i try to execute the above pl-sql procedure , it crashed. So i found out that while looping through the names one of the name has a single quote which is why i was facing issue. In this case how to escape single quote.
name.rec is having name1, name2,name3 , ..... out of these one name is having single quotes and not sure which one. I want to escape single quote here.
 
     
    