Answer the question
In order to leave comments, you need to log in
Mysql how to remove all text from a column after a space?
Hello.
There is a column in which names and surnames are indicated.
Please tell me a query with which you can delete all text after a space, i.e. get rid of the names.
I have no knowledge at all.
I was looking for manuals, but there are some complex tasks, but I don’t know how to implement such a simple one.
Answer the question
In order to leave comments, you need to log in
UPDATE `my_table`
SET `name` = REGEXP_REPLACE(`name`, '\s.+', '')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question