手记

合并查询

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

0人推荐
随时随地看视频
慕课网APP