I need to append and prepend each value in a column called description with <p></p>
So I need to append each value with <p>
and append with </p>
So the following test
will become <p>test</p>
.
Could anyone suggest a query that will handle this?
UPDATE mytable SET description = CONCAT("<p>", description, "</p>")
You can try like this:
update mytable
set col = '<p>' + col + '</p>';
or else you can use the CONCAT function like
update mytable
set col = CONCAT('<p>', col, '</p>')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With