Quotation(') in Data to be quaried

Database

Quotation(') in Data to be quaried

I was trying select NAME from TABLE_NAME where NAME '%\'%' ESCAPE '\';
The above query not working.

I would like to how would we handle quotation in side the data.
3 REPLIES
Enthusiast

Re: Quotation(') in Data to be quaried

can you try this .......

select NAME
from TABLE_NAME
where NAME LIKE '%''%'
;

Re: Quotation(') in Data to be quaried

Silva I tried '%''%' it is not working

Re: Quotation(') in Data to be quaried

using two single quotes

like '%''%'

seems to work. same with insert statements, i.e. insert into table (names) values ('Int''l'); would insert the string Int'l