1、去掉某列記錄中的特殊字符
例如:/r,update test_table set key=replace(key, char(13), '');
其他特殊字符類似。
2、查詢重複的記錄
Select weixinid From dianxin_highda_detail Group By weixinid Having Count(*)>1;
3、從txt向數據庫導入記錄
load data infile 'C:\\Program Files\\SecureCRT\\download\\6192.txt' into table dianxin_highda_detail;
load data infile 'C:\\Program Files\\SecureCRT\\download\\6192.txt' into table dianxin_highda_detail(accountname);
4、從數據庫中導出數據到txt
select * from dianxin_highda_detail where sharetime>='2013-06-18 17:00:00' and sharetime<'2013-06-19 17:00:00' into outfile '/tmp/6192.txt';