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.
現在、テーブルの列に完全修飾クラス名を保持していますが、バックエンドでこの機能を変更して、単純なクラス名を保持するようにしました。
データベースで完全修飾クラス名を単純な名前に更新する必要がありますが、REGEXP を使用してそれを行う方法がわかりません
列のデータを更新して変更com.test.models.core.SomeFilterしたいSomeFilter
com.test.models.core.SomeFilter
SomeFilter
そのため、最後のピリオドからテキストを取得し、列を更新します。
UPDATE filter_table SET filter_name= SUBSTRING_INDEX(filter_name, '.', -1);