Managing escape characters in SQL and Java
843854Sep 16 2002 — edited Nov 12 2002Hello All,
How can I manage special characters(ESPECIALLY single quotes) in my select statements?? If I have to query the database for the rows with name O'brain for example, I am writing a query
String SQL = "SELECT Name FROM MyTable where Name like 'O/'brain%' {escape '/'}";
But this is not working for me. I am using Sybase database. Can anyone help me out with this ?? I don't want to use prepared statements.
Thanks & Regards,
Sarada.