I want to retrieve a record where the value contains single quote and double quote.
Tried The following:
select * from Table1 where id = '' . ~";:><?/\\!@#$%^*()_+|/ \\
select * from Table1 where id = '' . ~";:><?/\\!@#$%^*()_+|/ \\
?' ; `
Use LIKE
in WHERE
clause to check whether it contains single quotes( '
) and double quotes( "
).
Query
select * from `your_table_name`
where `id` like '%''%'
or `id` like '%"%';
select * from table1 where name like "%'%" OR name like '%"%';
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.