devxlogo

Understanding the REPLACE Command in MySQL

Understanding the REPLACE Command in MySQL

At times, it is necessary to replace full or partial value in a column. The following command will be handy in achieving the this result.

UPDATE TABLE_NAME SET COLUMN_NAME = REPLACE(COLUMN_NAME,'TEXT_TO_REPLACE','TEXT_TO_BE_REPLACED') WHERE CONDITION;

devx-admin

Share the Post: