继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

合并多个查询结果中的数据

黄朕
关注TA
已关注
手记 4
粉丝 0
获赞 1

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

--查询学生表的学生姓名,班级表的班级名称,将结果合并到classstudent表
select stuname,classno into classstudent
from Student
union
select Classname,classno
from Class
order by ClassNo

select *from classstudent

打开App,阅读手记
1人推荐
发表评论
随时随地看视频慕课网APP