求更新SQL语句。

5410 2004-11-11 04:37:56
要求一条语句解决。
表1
No
Price

表2
No
Price
UnitPrice

要求将表2的UnitPrice更新到表1的Price.
特殊用途。谢谢。
...全文
70 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
cosio 2004-11-11
  • 打赏
  • 举报
回复
update 表1 a set a.price = b.unitprice
from 表2 b where a.no = b.no
davorsuker39 2004-11-11
  • 打赏
  • 举报
回复
update 表1 set 表1.Price=表2.UnitPrice
from 表2
where 表2.No=表1.No
5410 2004-11-11
  • 打赏
  • 举报
回复
高。谢谢
lsxaa 2004-11-11
  • 打赏
  • 举报
回复
update 表1 set price=表2.unitprice
from 表2
where 表2.no=表1.no --no关联

34,590

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧