select couname,couno
from Course
union all
select state,couno
from StuCou
order by couno
select couname,couno into coursestate
from Course
union
select state,couno
from StuCou
order by couno
select*from coursestate
drop table coursestate
--查询学生表的学生姓名,班级表的班级名称,将结果合并到coursestate中
select stuname,classno into classstudent
from Student
union
select classname,classno
from Class
order by classno