MySQL社区

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
查看: 2362|回复: 5
打印 上一主题 下一主题

[SQL类] update求助

[复制链接]
1#
发表于 2015-9-16 16:34:42 | 显示全部楼层
kider 发表于 2015-8-3 18:41
别呀,谁都有疏忽的时候。

kider 对于这个问题,我这样写

update t_two set t_two.address = (select t_three.address from t_three where t_three.id=t_two.id);



update t_two,t_three set t_two.address=t_three.address where t_two.id=t_three.id;

这两种写法不同点在哪?推荐用哪种写法,大神能稍微解释下么?

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|申请友链|小黑屋|Archiver|手机版|MySQL社区 ( 京ICP备07012489号   
联系人:周生; 联系电话:13911732319

GMT+8, 2024-5-13 15:40 , Processed in 0.062573 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表