Home > database >  MYSQL LIKE function specified range query no returns as a result, the great god give directions.
MYSQL LIKE function specified range query no returns as a result, the great god give directions.

Time:11-30

Stroll BBS introduce mysql LIKE function has the following usage:
Such as SELECT * FROM [user] WHERE u_name LIKE '[Zhang Liwang] three'
Will find out "zhang", "three li", "three" (not "Zhang Liwang three");

Actual tests,
Select * from table where NAME like '[li] zhao money sun jie'
Return no results;
Select * from table where NAME regexp '[li] zhao money sun jie'
Will return the corresponding results of name of zhao jie Qian Jie sun jie li jie can query out

Consult a great god, and the LIKE function may not apply to [] specified range query? Thank you very much:)
  • Related