MySQL
MySQL Command — Replace, Append command
February 5, 2016
0

To append a text after the content for a column:

UPDATE `articles` SET introtext= concat(introtext, ‘</div>’);

 

To add a text before the content for a column:

UPDATE `articles` SET introtext= concat(‘<hr class=”system-pagebreak” /><div style=”display:none;”>’,introtext);

 

To replace text in the content for a column:

UPDATE `articles`
SET introtext = REPLACE(introtext, ‘<hr class=”system-pagebreak” />’, ‘</div><hr class=”system-pagebreak” /><div style=”display:none;”>’);

About author

ZERIN

CEO & Founder (BdBooking.com - Online Hotel Booking System), CEO & Founder (TaskGum.com - Task Managment Software), CEO & Founder (InnKeyPro.com - Hotel ERP), Software Engineer & Solution Architect

How to get MySQL Table Storage Sizes

Getting MySQL Database Storage Sizes If you’...

Read more

Upgrading MySQL 5.6 to 5.7 – Group By Does not work anymore

Recently I have updated one of my server MySQL, th...

Read more
mariadb_mysql

MySQL how To – show open database connections

MySQL Current Connection Query Information You can...

Read more

There are 0 comments

Leave a Reply

Your email address will not be published. Required fields are marked *