A-A+

查询存在 01 课程但可能不存在 02 课程的情况(不存在时显示为 null ) select * from (select SC.SId SC.score from SC where SC.CId = '01') as t1 left join (select SC.SId SC.score from SC where SC.CId = '02') as t2 on t1.SId = t2.SId

2024-04-26 18:58:02 网课题库 阅读

问题详情

查询存在" 01 "课程但可能不存在" 02 "课程的情况(不存在时显示为 null ) select * from (select SC.SId, SC.score from SC where SC.CId = "01") as t1 left join (select SC.SId, SC.score from SC where SC.CId = "02") as t2 on t1.SId = t2.SId

参考答案

select *from Coursewhere CID = 001 or CID = 002

考点:不存在,课程,存在
Copyright © 2018-2024 问答库 保留所有权利.   SiteMap  .