索引就是那个id和corp了
要更新的是其中的100个列
UPDATE mstr set
state=a.state,
p_in_date=a.p_in_date
from import a where a.id=mstr.emp_id
and a.corp=mstr.corp and mstr.corp='01'
sql大概就这样,不过写了100个列。。。
不知道怎么写能快一些,现在这个update要更新10分钟[/quote]
语句已经够简洁了;
是一次性更新吗?一次性的时间长点就长点吧;
如果是需要多次做这个操作,我觉得可以从设计上再考虑考虑;
索引就是那个id和corp了
要更新的是其中的100个列
UPDATE mstr set
state=a.state,
p_in_date=a.p_in_date
from import a where a.id=mstr.emp_id
and a.corp=mstr.corp and mstr.corp='01'
sql大概就这样,不过写了100个列。。。
不知道怎么写能快一些,现在这个update要更新10分钟