my_table
contains three columns: name
, address1
, and address2
.
I want to find all records which contains single quotes. How can I do this?
You have to escape the single quotes in the expressions by doubling them, e.g.:
select * from my_table
where name like '%''%'
or address1 like '%''%'
or address2 like '%''%';
... where name || address1 || address2 like '%''%';
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