PostgreSQL字符串追加和替换SQL
字符串追加
查询
select 'a' || name as name, 'b' || age as age from mytable;
更新
update mytable set name = 'a' || name, age = 'b' || age;
字符串替换
update mytable set name = replace(name, 'cat', 'dog') where id=1 ;
查询
select 'a' || name as name, 'b' || age as age from mytable;
更新
update mytable set name = 'a' || name, age = 'b' || age;
update mytable set name = replace(name, 'cat', 'dog') where id=1 ;
QQ:248687950
邮件:admin@nbhao.org
工作时间:周一至周五,9:00-18:00,节假日休息