From ea699cb358fbca12d1a21a5df0749d9b946e4d48 Mon Sep 17 00:00:00 2001 From: wenqiurong Date: Thu, 19 Sep 2019 20:32:47 +0800 Subject: [PATCH] =?UTF-8?q?Update=20page=20'=E6=B2=B3=E5=8C=97=E7=89=88?= =?UTF-8?q?=E4=B8=8A=E7=BA=BFSQL'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- %E6%B2%B3%E5%8C%97%E7%89%88%E4%B8%8A%E7%BA%BFSQL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/%E6%B2%B3%E5%8C%97%E7%89%88%E4%B8%8A%E7%BA%BFSQL.md b/%E6%B2%B3%E5%8C%97%E7%89%88%E4%B8%8A%E7%BA%BFSQL.md index af2b9f0..7059f40 100644 --- a/%E6%B2%B3%E5%8C%97%E7%89%88%E4%B8%8A%E7%BA%BFSQL.md +++ b/%E6%B2%B3%E5%8C%97%E7%89%88%E4%B8%8A%E7%BA%BFSQL.md @@ -20,12 +20,12 @@ VALUES ### 修复数据,成长值不一致,以wx_c_user表数据为准 ``` -UPDATE wx_c_user_basic_info cub SET cub.poins=(SELECT cu.score FROM wx_c_user cu WHERE cu.id=cub.id ),update_date=now(); +update wx_c_user_basic_info cub,wx_c_user c set cub.poins=c.score,cub.update_date=now() where c.id=cub.id ``` ### 修复数据,积分不一致,以wx_c_user表数据为准 ``` -UPDATE wx_c_user_basic_info cub SET cub.credit=(SELECT cu.credit FROM wx_c_user cu WHERE cu.id=cub.id ),update_date=now(); +update wx_c_user_basic_info cub,wx_c_user c set cub.credit=c.credit,cub.update_date=now() where c.id=cub.id ``` ### 修复数据 券库存不一致