码迷,mamicode.com
首页 > 数据库 > 详细

MySQL REPLACE替换输出

时间:2015-04-11 14:40:30      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:

原输出:
[root@ARPGTest ~]# mysql -p`cat /data/save/mysql_root` pro_manager -e‘select erlang_script,sql_script,file_list from oms_hotswap_plan\G‘ -sN
*************************** 1. row ***************************
u:u([util]).
u:u([log]).
select * from version;
select * from version;
server/ebin/util.beam
server/ebin/log.beam
 
 
把换行替换成空格输出
[root@ARPGTest ~]# mysql -p`cat /data/save/mysql_root` pro_manager -e‘select REPLACE(erlang_script,"\r\n"," ") as erlang_script,replace(sql_script,"\r\n"," ") as sql_script,replace(file_list,"\r\n"," ") from oms_hotswap_plan\G‘ -sN
*************************** 1. row ***************************
u:u([util]).  u:u([log]).
select * from version;  select * from version;
server/ebin/util.beam  server/ebin/log.beam

MySQL REPLACE替换输出

标签:

原文地址:http://www.cnblogs.com/fjping0606/p/4417685.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!