例如:
select * from content where text like '%Zero's note%'
上述字串「Zero's note」中的單引號會造成查詢錯誤,所以將單引號修改後成為:
select * from content where text like '%Zero''s note%'
Reference:
How do I use a string literal that contains an embedded single-quote (') character?
沒有留言:
張貼留言
除非必要,請不要在回覆時留下您的敏感資訊 (電話、email、地址等)