In Oracle, how can I use SQL to check whether the field contains Chinese Characters? Today, a colleague's data migration program has a problem. I didn't consider Chinese encoding characters. Because the migrated table has tens of millions of data, however, there are very few records in Chinese. can I find the number of records with Chinese content. First of all, I want to use the method of checking each byte ASCII. In this case, I need to write a UDF and call it in SQL to get the result. However, it seems that this method is time-consuming. After all, each character must be compared, so it is not implemented. Www.2cto.com suddenly came to mind that Oracle had a function for encoding conversion called Convert. If a character string contains non-ASCII characters before and after encoding conversion, the result is displayed. Finally, I wrote it and tested it. It is indeed feasible. The scan will end in 10 seconds after 55 million records are recorded. The following is a test case: SQL> select * 2 from (select 'abc' c1 from dual 3 union all 4 select 'AB test Cd' c1 from dual) 5 where c1 <> CONVERT (c1, 'us7ascii ', 'zhs16gbk'); C1 -------- test cd www.2cto.com CONVERT Function Description: CONVERT (inputstring, dest_charset, source_charset) inputstring: the string dest_charset to be converted: The target character set source_charset: the original character set. This is just a small trick. One day you may have such a requirement, which may be useful.