Reputation: 373
I Want to retrive the data from Oracle DB where name contins single quote(')
Select * from table_name where name in ('Joel D'Silva','O'neil Dsa');
Upvotes: 1
Views: 4959
Reputation: 9053
You could pass string to q'[]'
in following:
Select * from table_name where name in (q'[Joel D'Silva','O'neil Dsa]');
or you could use quote '
twice in following:
Select * from table_name where name in ('Joel D''Silva'',''O''neil Dsa');
Upvotes: 4
Reputation: 31879
Replace '
with ''
:
Select * from table_name where name in ('Joel D''Silva','O''neil Dsa');
Upvotes: 3