2

I currently persist fully qualified class names in a table column but have changed this functionality in the backend to persist simple class names.

I need to update the fully qualified class names to simple names in the database but not sure how i would do it using REGEXP

I want to update column data and change com.test.models.core.SomeFilter to become SomeFilter

so getting the text from the last full stop and updating the column.

1

1 Answer 1

2
UPDATE filter_table SET filter_name= SUBSTRING_INDEX(filter_name, '.', -1);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.