mysql,access上是这样写的

update Student a,Student2 b

set a.class_name=b.class_name

where a.student_num=b.student_num

==============================

sql2005上是这样写的

UPDATE [Student]
   SET [Student].[class_name] = [Student2].[class_name]
from [Student],[Student2]
WHERE [Student].[student_num] = [Student2].[student_num]

[]去掉应该也可以。

posted on 2010-04-24 09:37  tillere007  阅读(587)  评论(0编辑  收藏  举报