- 数据库备份
mysqldump -u username -p dbname table1 table2 ...> BackupName.sql
table 不写 为全部备份
- 我把时间戳写成了字符串,并且还不是标准的,多了3个0;进行查询
// SELECT * FROM `t_min_price_future_ok_btc` WHERE ( from_unixtime(substr(Z_TIME,1,10)) > from_unixtime(substr(1473065520000,1,10))) LIMIT 10 ;
from_unixtime() 把时间戳(字符串)转换成时间
substr()截取时间
- 复制一个表的一个字段到另一个表中
set SQL_SAFE_UPDATES=0; #关闭安全更新模式
update signin.t_customer set wx_open_id=(select sourceId from xxx.audience where signin.t_customer.phone=xxx.audience.phone);
set SQL_SAFE_UPDATES = 1;#开启安全更新模式
网友评论