1. 程式人生 > >MySQL模糊查詢特殊字元如何查詢?

MySQL模糊查詢特殊字元如何查詢?

1.關鍵字escape

例子:select * from user where name like "%/%%" escape "/"

2.函式 instr

例子:select * from user having  instr(name,"%")

mySQL裡面locate和instr一樣,好像是相同的,具體自己深入瞭解