SQL查询的内容中含有单引号,怎么实现查询

2025-03-03 18:29:11
推荐回答(1个)
回答1:

转义单引号 为 \' 即可

比如 要查询 的字段值 为 Jam's Toy
可以写为 select * from T where T.`name` = 'Jam\'s Toy';