Skip to content
Advertisement

How to Update table row using regex

I have a table with rows like this:

and I want to update my rows to keep only normal data and delete data inside “()” I’m wondering if there is a way to use regex inside my SQL update statement to delete all data after ” (“

Advertisement

Answer

You must use 2 SUBSTRING_INDEX like this if there also some data behind the ).

sample

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement