More than 2 time string

(country) (city)
China Peking
Japan Tokyo
USA New York
USA L.A.
Germany Berlin
Fance Paris
Japan Tokyo
Korea Seoul
Egypt Cairo
Guatemala Guatemala

I have a table "test’ like the above.

SELECT country FROM test 
WHERE country LIKE '%m%'";

The code above produces the following.

Germany, Guatemala

AND,

SELECT country FROM test 
WHERE country LIKE '%a%'";

The code above produces the following.

China, Japan, USA, USA, Germany, Fance, Japan, Korea, Guatemala

The would-be code below does not work correctly but I hope it show what I want.

SELECT country FROM test 
WHERE country LIKE '%a,a%'";

The target result below is what I want.

Japan, Japan, Guatemala.

%a%a%

The answer is, I found it myself, the above.

1 Like