MySQL - Parse Field

时间:2017-03-02 23:34:05

标签: python mysql sql

I have this query:

SELECT name 
FROM users 
WHERE CONCAT(' ', name) LIKE 'Jor%'
LIMIT 15 

It gives me all result that starts with "Jor":

  • Jorge
  • Jujuy
  • Jordania

But also I want this results:

  • Michael Jorckson
  • Fray Jordan
  • Etcetera Jor

How can I do this?

1 个答案:

答案 0 :(得分:0)

Try This:

SELECT name 
FROM users 
WHERE name LIKE 'Jor%'
OR name LIKE '% Jor%'
LIMIT 15