hellosheikh
hellosheikh

Reputation: 3015

How Can I remove the numeric values from mysql column

hello I want to remove numeric values from column.

enter image description here

Please let me know what would be the query to remove all the numeric values from mysql database

Note:

This Note is for those who are marking this question as duplicate

Please understand the difference. I don't want to "select" the string values from column. I want to completely remove the integer values or numeric values from column.

Upvotes: 0

Views: 1551

Answers (1)

Tin
Tin

Reputation: 804

First check if it will fix according as follow:

SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(city_name, '\n', 1), '\n', -1) FROM yourtable;

If you're sure, do the following:

UPDATE yourtable
SET city_name = SUBSTRING_INDEX(SUBSTRING_INDEX(city_name, '\n', 1), '\n', -1); 

Reference: How to split the name string in mysql?

Upvotes: 1

Related Questions