+ -
当前位置:首页 → 问答吧 → 很蛋疼的更新问题

很蛋疼的更新问题

时间:2011-11-20

来源:互联网

表1:Basicinfo:StuNo,Grade_ID

表2:Class:StuNo,Id

现在要把表1中Grade_ID更新成表2的ID怎么弄?

作者: ApExpar   发布时间: 2011-11-20

SQL code

update 表1 set Grade_ID=b.Id from 表1 a inner join 表2 on a.StuNo=b.StuNo

作者: pengxuan   发布时间: 2011-11-20

SQL code
update a set Grade_ID=b.id from 表1 a join 表2  b on a.StuNo=b.StuNo

作者: fredrickhu   发布时间: 2011-11-20

SQL code

update a set Grade_ID=b.id from 表1 a, 表2  b where a.StuNo=b.StuNo


作者: hllfl   发布时间: 2011-11-20