insert into Table3(StuID,CourseID,Hours,Credit,Grade)
select stuid , (select courseid from table2 where courseno = '12345'),35,5,80
from table1
where stuid = '01234567'
select stuid , (select courseid from table2 where courseno = '12345'),35,5,80
from table1
where stuid = '01234567'
select b.stuid,c.CourseID,a.Hours,a.Credit,a.Grade
from 当前数据表 a,Table1 b,Table2 c
where a.StuNO=b.StuNO and a.CourseNO=c.CourseNO
应该怪我没说明白,已知数据是用户输入得到的。你的方法好像不行。
Guanfj(蓝百合)
的方法我先去试一下。
谢谢两位先。