sql php mysql
表名: table1 oracle的,mysql没有测试,把对应的函数换成mysql的应该就可以了。
select replace(firstStr, 's', 'a')||secondStr
from (SELECT substr(str, 0, instr(str, 's')) firstStr,
substr(str, instr(str, 's')+1) secondStr
FROM (select t1.value str from table1 t1 where t1.id=1))
不好意思刚刚那个忘记换个字符。
oracle的,mysql没有测试,把对应的函数换成mysql的应该就可以了。
select replace(firstStr, '4', '3')||secondStr
from (SELECT substr(str, 0, instr(str, '4')) firstStr,
substr(str, instr(str, '4')+1) secondStr
FROM (select t1.value str from table1 t1 where t1.id=1))
select replace(firstStr, '3', '4')||secondStr
from (SELECT substr(str, 0, instr(str, '3')) firstStr,
substr(str, instr(str, '3')+1) secondStr
FROM (select t1.value str from table1 t1 where t1.id=1))
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号