• 全部
  • 基础类
  • 应用实例
  • 新技术前沿

关于一次更新一万条数据的问题

kinglds 2004-02-27 11:01:44
我用Update 一次更新链接数据库一个表的一万条数据,这个表有二十多个字段,很慢,有什么办法可以快点?
以下是更新语句:
--更新本地数据库产品表中已更新而远程数据库产品表中还没有更新的产品记录
UPDATE NET.HzmjxcXy.DBO.spzl SET NET.HzmjxcXy.DBO.spzl.Txm = b.Txm,NET.HzmjxcXy.DBO.spzl.Spmc = b.Spmc,NET.HzmjxcXy.DBO.spzl.Spgg = b.Spgg,NET.HzmjxcXy.DBO.spzl.Spcd = b.Spcd,
NET.HzmjxcXy.DBO.spzl.Mindw = b.Mindw,NET.HzmjxcXy.DBO.spzl.Middw = b.Middw,NET.HzmjxcXy.DBO.spzl.Midbl = b.Midbl,NET.HzmjxcXy.DBO.spzl.Maxdw = b.Maxdw,
NET.HzmjxcXy.DBO.spzl.Maxbl = b.Maxbl,NET.HzmjxcXy.DBO.spzl.Cydw = b.Cydw,NET.HzmjxcXy.DBO.spzl.Cybl = b.Cybl,NET.HzmjxcXy.DBO.spzl.Xsjg1 = b.Xsjg1,NET.HzmjxcXy.DBO.spzl.Xsjg2 = b.Xsjg2,
NET.HzmjxcXy.DBO.spzl.Xsjg3 = b.Xsjg3,NET.HzmjxcXy.DBO.spzl.Xsjg4 = b.Xsjg4,NET.HzmjxcXy.DBO.spzl.Xsjg5 = b.Xsjg5,NET.HzmjxcXy.DBO.spzl.Xsjg6 = b.Xsjg6,NET.HzmjxcXy.DBO.spzl.Jhjg1 = b.Jhjg1,
NET.HzmjxcXy.DBO.spzl.Jhjg2 = b.Jhjg2,NET.HzmjxcXy.DBO.spzl.Jhjg3 = b.Jhjg3,NET.HzmjxcXy.DBO.spzl.Jhjg4 = b.Jhjg4,NET.HzmjxcXy.DBO.spzl.Highsl = b.Highsl,NET.HzmjxcXy.DBO.spzl.Lowsl = b.Lowsl,
NET.HzmjxcXy.DBO.spzl.Yxq = b.Yxq,NET.HzmjxcXy.DBO.spzl.VisibleBZ = b.VisibleBZ,NET.HzmjxcXy.DBO.spzl.Cs = b.Cs,NET.HzmjxcXy.DBO.spzl.Memo = b.Memo
FROM NET.HzmjxcXy.DBO.spzl a INNER JOIN (SELECT Spdm,Txm,Spmc,Spgg,Spcd,Mindw,Middw,Midbl,Maxdw,Maxbl,Cydw,Cybl,Xsjg1,Xsjg2,Xsjg3,Xsjg4,Xsjg5,Xsjg6,Jhjg1,Jhjg2,Jhjg3,Jhjg4,Highsl,Lowsl,Yxq,VisibleBZ,Cs,Memo
FROM spzl)b
ON a.spdm = b.spdm
WHERE a.spdm = b.spdm
...全文
120 点赞 收藏 1
写回复
1 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
gzapu 2004-04-07
up
回复
发帖
MS-SQL Server
创建于2007-09-28

3.3w+

社区成员

MS-SQL Server相关内容讨论专区
申请成为版主
帖子事件
创建了帖子
2004-02-27 11:01
社区公告
暂无公告