Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> how to escape single quotes
Hi,
How do I guard against single quotes in text messing up my SQL statements. For example, I have some text like:
'this is some text. It's got an apostrophe in it'
ie there's inadvertantly 3 single quotes there, which ruin the SQL statement. I could URL-encode the text first and URL-decode it afterwards (using PHP), but is there a 'proper' way to encode it (in Oracle 8)?
tia,
![]() |
![]() |