I have a column city that has values in two languages namely Greek or English, e.g. Athens or Αθήνα. How to make a query to get the row that has values only in English or only in Greek without any additional field about language ?
            Asked
            
        
        
            Active
            
        
            Viewed 28 times
        
    1 Answers
0
            
            
        Take only Greek:
SELECT * FROM `Mytable` WHERE HEX(city) REGEXP '^(..)*C[EF]'
Not Greek:
SELECT * FROM `Mytable` WHERE HEX(city) NOT REGEXP '^(..)*C[EF]'
There is no code for English. Some codes can be found in : How to identify a language in utf-8 column in MySQL
 
    
    
        Dimitrios Ververidis
        
- 1,118
- 1
- 9
- 33