I have a column containing certain expressions stored as a text string which include single quotatons, such as 'missed transaction' (INCLUDING the quotations)
How can I use a where clause with such an occurance?
select * from table where reason = ''missed transaction''
doesn't work, and I can't use the replace function because it also requires single quotations in its syntax. Obscure problem, i know. But thanks for any help.
You need to escape the '
by doubling them :
select * from table where reason = '''missed transaction''';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With