gpt4 book ai didi

mysql - 在 SQL 中将特定字符串设为大写

转载 作者:行者123 更新时间:2023-11-29 10:43:21 24 4
gpt4 key购买 nike

我正在尝试将特定字符串更改为大写,我的代码是

update $table 
set work_log_history = concat(("$created_by response on $toDate $history"||chr(10)),work_log_history)
where id="$id"

在上面的查询中,我想将 $created_by 字符串设为大写。

最佳答案

我认为 UPPER() 函数在这种情况下应该适合你?请参阅此处的文档:https://dev.mysql.com/doc/refman/5.7/en/string-functions.html

所以你的代码看起来像:

update $table 
set work_log_history=concat((UPPER($created_by)," response on $toDate $history"||chr(10)),work_log_history)
where id="$id"

关于mysql - 在 SQL 中将特定字符串设为大写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45072459/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com