嘿,在MySql中工作,并创建了一个名称库。
现在,我有一列名为“团队名称”的列,即“ Ohno Romo”。我希望标题为“ opp code”的列看起来像这样:“ team(Ohno Romo)”
[如果有人可以帮助我,请在团队名称之前和之后添加“团队”和括号,这将非常有帮助。谢谢!
对于这种类型的字符串处理,请使用CONCAT()
set @str_1 = 'opp code', @str_2 = 'Ohno Romo';
select concat(@str_1, '(', @str_2, ')');
https://dev.mysql.com/doc/refman/8.0/en/string-functions.html