MySql常用语句

mysql分析当前的查询线程

select * from information_schema.`PROCESSLIST` where info is not null;

或者

show processList

 

联表更新

UPDATE tobacco_product AS p, `temp_公司商品维护(通用)` AS t SET p.ONLINE_DATE_YEAR = CONVERT(STR_TO_DATE(t.`入网日期`, “%Y”),int) WHERE p.CIG_UPCS_CD = t.`条包装条形码`