sql 随笔更新
Posted 少年乘风
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 随笔更新相关的知识,希望对你有一定的参考价值。
SELECT DISTINCT(p.`id`), p.`id` , v.`full_name` , CONCAT(LEFT(v.mobile, 7), ‘****‘) , DATE_FORMAT(DATE_ADD(v.`visit_time`, INTERVAL 8 HOUR), ‘%Y-%m-%d %H:%i:%s‘) , v.`remark` , w.`address_city` , v.`record_person` , v.`consult_country` , v.`first_visit` , v.`contact_advisor` , v.`follow_advisor` , v.`assign_person` FROM `aaaa`.`xxxxx` AS v LEFT JOIN `bbbb`.`xxxxxxxxxx` AS p ON v.`mobile`= p.`mobile` LEFT JOIN `cccc` AS w ON (w.`full_name` =v.`contact_advisor` or w.`full_name`=v.`follow_advisor` or w.`full_name` =v.`assign_person` ) WHERE v.`visit_time`> DATE_FORMAT(DATE_SUB(now(), INTERVAL 24 HOUR), ‘%Y-%m-%d 10:00:00‘)
以上是关于sql 随笔更新的主要内容,如果未能解决你的问题,请参考以下文章