一品网
  • 首页

【MySQL】mysql实现将b表某列数据填充到a表


直接上sql:

update order_trace a set a.delivery_time=(select delivery_time from order_express_info b where b.order_id=a.order_id limit 1 ) 
WHERE 1=1
AND a.delivery_time is NULL 
#and order_id='2009056564382490' 
limit 20000;

(一次性可以跑2万条)

子查询的limit 1 是优化查询,必须得带上。

PHP原生mysql

相关


源码安装部署小龙虾OpenClaw的方法 开发者专属

小龙虾OpenClaw安装部署的常见问题与避坑指南

Docker容器部署小龙虾OpenClaw的方法

小龙虾OpenClaw一键安装脚本部署本地电脑安装部署

Git--学习笔记(三)远程仓库克隆到本地

全国产化 自主可控 飞腾4核主板

html标签

洛谷P5340 大中锋的游乐场 题解 分层图最短路

学习《Python编程从入门到实践》PDF+代码训练

【OF框架】定义框架标准WebApi,按照规范返回状态信息及数据信息

Windows cmd 启动 tomcat 中文乱码问题

有勇气的牛排博客

标签

一品网 冀ICP备14022925号-6