I have a function that needs a string as parameter. It's always a insert. How do I make it work? The double quotes for the values are not good syntactically

select inversor_insert('INSERT INTO clien(column1,column2) values('value1','value2')') 
from dual;

1 Answer 1


You can try the following;

select inversor_insert(q'[INSERT INTO clien(column1,column2) values('value1','value2')]')

The q'[ ]' construct simply means that Oracle will treat anything within the brackets as it is written. you don't need to worry about quoting the quotes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.