Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SQL ステートメントを書いていて、奇妙な文字を含むすべての行を見つけたいとしましょう。MySQLでこれを行う方法はありますか?
SELECT foo, bar, beep, bop FROM widgets WHERE widget_name REGEXP '???'
Perlに相当するものは次のようになります
/\x{FFF}/ # character ordinal 4095, unused tibetan character
特定のエンコーディング (Windows-1252 など) では表現できない文字列を見つけたい場合は、文字列をそのエンコーディングに変換し、それ自体と比較することができます。
WHERE CONVERT(widget_name USING latin1) != widget_name