T
T
tutuzken2015-12-15 19:10:49
MySQL
tutuzken, 2015-12-15 19:10:49

How to delete everything in the table after the specified text?

How can a base table delete everything after a word to the end of a cell?
For example, in a base cell there is a text:
"First text text text WORD second text text text" and there are many such cells in the database.
What command can go over all the cells and delete everything after the word "WORD", so that only the following remains in the cells:
"First text text text"
Please tell me. Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2015-12-15
@opium

use the LOCATE() and SUBSTRING() functions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question