I was wondering if someone is able to lend some wisdom about how to accomplish the following task in MySQL.
I need to run a query to add something inside a field before and after the existing data. For example, let's say I have the following data in 'characters.name':
'Fred Flintstone'
'Barney Rubble'
How would I insert something, in this example 'xxxxx' before the existing data 'Fred Flinstone' and also 'yyyyy' after the data?
The result would be:
'xxxxxFred Flintstoneyyyyy'
'xxxxxBarney Rubbleyyyyy'
Any assistance with this would be greatly appreciated.
Many thanks!
SELECT CONCAT('xxxxx', name, 'yyyyy') AS name FROM characters
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