Deleting part of a string in MYSQL

When you want to edit a field, you need an UPDATE statement:

UPDATE table SET fieldname=REPLACE(fieldname,'APS','')

REPLACE is a string function that replaces every occurence of the 2nd string in the 1st string with the 3rd one.

Please try this with a WHERE clause first, to see if it is really what you want to do.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)